kennethkalmer / ember-cli-nouislider

{{range-slider}} component for ember-cli powered by noUiSlider
http://kennethkalmer.github.com/ember-cli-nouislider
MIT License
44 stars 52 forks source link

Cannot update `max` value after initial render #87

Open cmackenz opened 4 years ago

cmackenz commented 4 years ago

Version: 1.1.0

When updating the max value I would expect the slider to respond to this new value, but unfortunately it does not.

The only way I have found to update this value in realtime is to force rerender the component.

{{#if sliderReady}}
  {{range-slider 
    start=start
    min=1
    max=calculatedTotal  <-- When updating `calculateTotal` the slider does update to reflect the new value
    connect=connect
    tooltips=true
    step=1
    on-change="sliderChanged"
  }}
{{/if}}

Basically, I observe the calculatedTotal change and then toggle the sliderReady value from true to false, and then back to true. This will rerender the range-slider with the udpated max value.

rreckonerr commented 4 years ago

The same issue affects "direction" option!