tb / ng2-nouislider

Angular2 noUiSlider directive
http://tb.github.io/ng2-nouislider/
MIT License
184 stars 114 forks source link

EventEmitters don't fire according to the noUiSlider order #129

Open pmairoldi opened 6 years ago

pmairoldi commented 6 years ago

When trying to use the set event emitter i've found that it doesn't fire in most conditions. This happens because the code that fires it checks that value of the handle is not equal to the current handle, if they are the same it does not emit events. Based on this set should fire all the time the value changes.

The fix would be to handle the model changes in the eventHandler function in nouislider.ts but not emit events there. Instead emit events always when the nouislider event fires like all other events.

My use case for this is that I want to change my component's inner model with ngModel but only post back a value to other components on the set event.