lifegadget / ui-slider

A visually attractive slider for ambitious Ember apps
https://ui-slider.firebaseapp.com/
MIT License
30 stars 39 forks source link

Final value on slide stop doesn't get sent to action handlers #27

Open steveklewis opened 7 years ago

steveklewis commented 7 years ago

I'm using Ember 2.9 and ui-slider 0.4.1. I've upgraded from ui-slider 0.3.5. seiyria-bootstrap-slider is at 7.1.1.

The behavior I'm seeing is that I can drag the slider but only the first value that was changed gets fired. If I have 1,2,3 and I start at 1, and drag to 3, the value in the handler is 2, and never 3.

I've looked at the examples and feel like I'm doing something very similar (the main change was sending sizeFilterTicks and sizeFilterTickLabels a string, instead of an array).

The major difference is that I'm setting my min & max & ticks, etc. from within my component that's using ui-slider, rather than passing in the scalar values in the template. Is there a specific lifecycle hook that I should be using? didReceiveAttrs doesn't seem to be adequate.

steveklewis commented 7 years ago

I've recreated a very basic component with a slider, and in my barebones app I get the opposite behavior: the change event only seems to get called on mouseup, so the final value is included in the event.

My guess is that I will have to Ember.observe the value to get this to work similarly to what I had before.

yankeeinlondon commented 7 years ago

Hmmm. I have not seen this behaviour. Can you reproduce in a twiddle?