Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about (onError) property #130

Open
jovanica7 opened this issue Mar 24, 2018 · 1 comment
Open

Question about (onError) property #130

jovanica7 opened this issue Mar 24, 2018 · 1 comment

Comments

@jovanica7
Copy link

Hi there,

Can you give an example of using this property? Is it possible for example to write some error message if consumer doesn't enter anything in the input? (e.g. min="1")

@dmoojunk
Copy link

dmoojunk commented Aug 28, 2018

For anyone searching for this, I came up with this - rather crude but worked for me -

<inline-editor
  (onSave)="field.hasError = false; saveEditable($event)"
  (onError)="field.hasError = true"
  max="10">
</inline-editor>

<span *ngIf="field.hasError">ERROR! Max is 10</span>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants