Closed gergelybodor closed 6 years ago
Apparently you are not supposed to use the same form control on two different html elements, my bad. My workaround works though. The only downside is that the input will only update when you let go of the slider or when the debounce time runs out.
I have the same form control attached to a simple input and a nouislider element. They both set the form control value separately, but they don't affect each other's value. How should I set up my form so that when I change the value in the input, the slider gets updated too with the new value (and the same for the other way)?
I created a stackblitz project for this.
Here is the code I use:
html:
component.ts:
Funny part is that disabling works on both, and if you use the commented out method call it works because we set the control value manually.
So my question is, am I doing something wrong here? What do I do so that my commented out code is not necessary?
There is an ongoing question on stackoverflow about this.