Hi,
I was following the Angular Template-driven validation to implement some kind of a Create New XXXX form.
In my implementation I noticed that the dirty/pristine were updating onBlur (click into the input and clicking outside the input) although no value was changed. This is a bit of an issue if you what to display errors only after a user changed a values.
Hi, I was following the Angular Template-driven validation to implement some kind of a
Create New XXXX
form.In my implementation I noticed that the
dirty/pristine
were updating onBlur (click into the input and clicking outside the input) although no value was changed. This is a bit of an issue if you what to display errors only after a user changed a values.The below implementations have the same logic:
Angular: https://stackblitz.com/edit/angular-t7dnq6-dfpyur?file=src%2Fapp%2Fname-editor%2Fname-editor.component.html React: https://codesandbox.io/s/64rplmk3pw
I would like to submit a PR with a fix but I need a bit of direction to how the onBlur effects an AbstractControl.
Thank, Daniel.