templating-resources icon indicating copy to clipboard operation
templating-resources copied to clipboard

debounce on input change, but immediate on blur

Open henebb opened this issue 8 years ago • 4 comments

Hi!

It would be great to have the same functionality as in angular 1: https://docs.angularjs.org/api/ng/directive/ngModelOptions That is: ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }"

The use case is that we want a debounce delay when typing (on e.g. input fields) but an immediate update on blur.

henebb avatar Jun 02 '16 11:06 henebb

+1

bondib avatar Mar 09 '17 19:03 bondib

well debounce does not know about events updateTrigger is very trigger happy..

the way I see it is there can be another behavior combining the two.. but its kinda not dry and not separated.. definitly doable though..

plugin?

Alexander-Taran avatar Mar 01 '18 00:03 Alexander-Taran

I guess rx from events or something should do the trick

@EisenbergEffect can be closed

Alexander-Taran avatar Jan 07 '19 13:01 Alexander-Taran

I'm pretty sure that a custom binding behavior could be written to do this. If someone wanted to submit a PR to the current debounce behavior to add that as a setting, we could do that too. This one is definitely worth adding to the vNext. Something for @fkleuver to consider to make sure it's possible in vNext. Also, maybe @bigopon would be interested in implementing it. He's been shoring up some of the missing behaviors in vNext.

EisenbergEffect avatar Jan 07 '19 15:01 EisenbergEffect