-
Notifications
You must be signed in to change notification settings - Fork 26.2k
feat(forms): add updateOn and ngFormOptions to NgForm #18594
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
Conversation
You can preview eddc5d7 at https://pr18594-eddc5d7.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mhevery Can you approve the public API changes? Reviewed informally with Igor before he left, but I need the formal PR approval for the check. |
You can preview 72b504f at https://pr18594-72b504f.ngbuilds.io/. |
This commit introduces a new Input property called `ngFormOptions` to the `NgForm` directive. You can use it to set default `updateOn` values for all the form's child controls. This default will be used unless the child has already explicitly set its own `updateOn` value in `ngModelOptions`. Potential values: `change` | `blur` | `submit` ```html <form [ngFormOptions]="{updateOn: blur}"> <input name="one" ngModel> <!-- will update on blur--> </form> ``` For more context, see [angular#18577](angular#18577).
You can preview 6a7f8a3 at https://pr18594-6a7f8a3.ngbuilds.io/. |
This doesn't yet support Example usecase for debounce:
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit introduces a new Input property called
ngFormOptions
to theNgForm
directive. You can use it to set defaultupdateOn
values for all the form's child controls. This default will be used unless the child has already explicitly set its ownupdateOn
value inngModelOptions
.Potential values:
change
|blur
|submit
For more context, see #18577.