zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
892 stars 231 forks source link

add option to disable handle move when clicking the slider bar #22

Closed kranheim closed 9 years ago

kranheim commented 9 years ago

We have a special case where we want to click on the slider without triggering a handle move. This is used for filtering values goal-slider below / above the handle.

homeslicesolutions-zz commented 9 years ago

I really support this feature! Any chance this can get merged in? I can see some pretty cool UI interactions with this feature @kranheim

qwtel commented 9 years ago

I didn't merge this pull request because the code seemed to specific to the use case (e.g. isAbove but no isBelow?) What I can offer you is a snapDragDisabled prop in combination with a onSliderClick handle that returns the value at the clicked location, so you can perform any calculations yourself.

qwtel commented 9 years ago

take a look at aec9d780d15bd4289e5266c0d508c7c9b91526bc (not on npm yet)

qwtel commented 9 years ago

Closing this one, as something similar can be achieved as described above