Repository navigation
feat(forms): add updateOn and ngFormOptions to NgForm - #18594
Conversation
|
You can preview eddc5d7 at https://pr18594-eddc5d7.ngbuilds.io/. |
|
@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
ngFormOptionsto theNgFormdirective. You can use it to set defaultupdateOnvalues for all the form's child controls. This default will be used unless the child has already explicitly set its ownupdateOnvalue inngModelOptions.Potential values:
change|blur|submitFor more context, see #18577.