You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(input): Allow custom events and timeouts to trigger model updates
By default, any change on the content will trigger an immediate model update
and form validation. Now you can override this behavior using the
`ng-update-model-on` attribute to bind only to a comma-delimited list of events.
I.e. `ng-update-model-on="blur"` will update and validate only after the control
loses focus.
If you want to keep the default behavior and just add new events that may
trigger the model update and validation, add `default` as one of the specified
events.
I.e. `ng-update-model-on="default,mousedown"`
Also, a `ng-update-model-debounce` attribute will allow defering the actual model
update some time after the last trigger event takes place (debouncing). This
feature is not available in radio buttons.
I.e. `ng-update-model-debounce="500"`
Custom debouncing timeouts can be set for each event if you use an object
in `ng-update-model-on`.
I.e. `ng-update-model-on="{default: 500, blur: 0}"`
You can specify both attributes in any tag so they became the default settings
for any child control, although they can be overriden.
Closesangular#1285
0 commit comments