leongersen / noUiSlider

noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies.
https://refreshless.com/nouislider/
MIT License
5.7k stars 657 forks source link

Indication if slider was changed #1205

Closed skyynet closed 2 years ago

skyynet commented 2 years ago

I have a slider with min and max handle. Let's say it shows a weight range from 10 to 100. When querying from database, the query is from 10 to 100.

I would like to have the slider show '-' instead of 10 and '+' instead of 100 and only change to the possible numbers, when the according handle is moved. This way, I could differ between preset min and max values (which I would ignore) and user selected ones.

Is this already possible or a new feature?

leongersen commented 2 years ago

You could keep a variable, say hasSliderChanged, and set it to true on the first change event. You can then have your update event check that variable to handle your display logic.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.