angular-redux / form

Keep your Angular2+ form state in Redux
MIT License
41 stars 15 forks source link

ng-model-options debounce is ignored #11

Closed seishin4real closed 7 years ago

seishin4real commented 7 years ago

I specified ng-model-options: <input type="text" class="form-control" name="question1" ngControl ngModel ng-model-options="{ debounce : { default : 1500, blur : 0 } }"/> but FORM_CHANGED action is dispatched on every keystroke.

e-schultz commented 7 years ago

The ngModelOptions that is part of Angular 2+ is very different than the Angular 1.x version.

ngModelOptions in Angular 2+, only indicate the name, and if it's a standalone element or not, and the docs are not very clear on what this actually does

I wish that the ng-model-options was closer to the Angular 1.x counterpart.

JohannesHoppe commented 7 years ago

Similar request here, on every input-field-keystroke I get a new action (see here). A little bit chatty, isn't it?

Could we get something like

(<any>this.form.valueChanges)
      .debounceTime(500)
      .distinctUntilChanged()

into the code?