UX with ng-model-options debounce: force the input text's value to equal default values if its value is empty
ngmikeng opened this issue · 2 comments
Steps to reproduce
- Use
ng-model-option={'debounce': 1000}
on elements input text. - Make empty value for the input Max Value.
Demo: https://jsfiddle.net/a9bv3z5x/
Expected behaviour
The input Max Value should not be forced to be the prior value and should be empty and wait for user inputs something. I think we can add more check if the input is equal null
so we don't need to update the model value of the slider, or add an option noForceDefaultRange
to do it or something.
As example, I can fix the issue for the input Min Value by using the option enforceStep
, so the input Min Value will not be forced to equal 0 and wait for user input.
Actual behaviour
The input Max Value be forced to equal the prior value, it maybe not make sense.
***Btw, thanks so much for efforts to create a wonderful library.
This is pretty complex to handle. What I would do is create a clone of this value that is only used for the input field. Then, whenever it changes, you do your custom logic before applying the new value to the slider one...
Thanks for your quick reply, @ValentinH .
I think I can resolve the issue by manual sync the value on the input field and the slider, with the event onChange
.