-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add resetOnMinMaxChange to the Slider component #1438
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a691044:
|
Hey @hiagolcm, I've linked the app in this workspace, and it still does not work. Do I need to set up anything else besides linking? |
Hey @danzanzini o/ I added a workspace in the PR description |
@hiagolcm Thanks. In the previous behavior the information on the slider did not reflect the proper search, so I see it as a bug |
…the default behavior
You mean removing the |
What is the purpose of this pull request?
Adds the
resetOnMinMaxChange
that allows the slider to keep the previous value when themin
or themax
are updatedWhat problem is this solving?
Currently in the Slider, when the minimum or maximum value changes, the entire position of the slider is reset. This can be confusing when these attributes are dynamic.
Here is a video to show the behavior
In the video, the user sets the left value to
84
, but after the update the left value is set back to22
. This happens because themax
changed from109
to110
. The user expects the initial value of84
to be maintained, even with the change in the maximum value.How should this be manually tested?
workspace
Add this code in
react/playground/Playground.tsx
:Screenshots or example usage
Types of changes