-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag cap at max value #28
Comments
It's currently not possible, I will consider it for a future release. |
Hi, some news about that? Thanks |
I'm working on a new version that will have a new range prop. That should cover your case. Can't give you any estimates on when that version will be out though, sorry. |
I have a very clunky fix for now using the props provided. It's not perfect and it breaks with certain drag behavior but it's better than nothing. The code sets draggable to false when the cap (20 in this case) is reached and resets the position of the knob to the appropriate location. However for some reason, this only works once and the knob position reset doesn't happen again. Maybe it has something to do with my code. When you start dragging the knob further again, the value doesn't go up (because of max={20}) but visually it makes a step of one before that gets capped. Basically: it caps, then you can drag it one further then it's supposed to go until it caps again. fseehawer, please look into implementing a fix! ` const capSlider = (value) => { return( |
Is there a way to make it not drag pass the max value?
currently, you can drag and spin muliple round trips.
can we make it not drag pass the min and max value ? just 1 round on the slider?
Thanks,
The text was updated successfully, but these errors were encountered: