Skip to content
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

[Slider] Prevent range slider thumbs from being dragged past each other #1612

Merged
merged 3 commits into from
Apr 1, 2025

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Mar 28, 2025

Fixes #1602

Demo: https://codesandbox.io/p/sandbox/great-wu-p6trjf

The issue was that percentageValues which determines the positioning also need to be clamped with adjacent values in range sliders like the value itself

@mj12albert mj12albert added component: slider This is the name of the generic UI component, not the React module! bug 🐛 Something doesn't work labels Mar 28, 2025
Copy link

netlify bot commented Mar 28, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit ecd61de
🔍 Latest deploy log https://app.netlify.com/sites/base-ui/deploys/67eb837bd4b5e00008b6d943
😎 Deploy Preview https://deploy-preview-1612--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mj12albert mj12albert force-pushed the fix/range-thumb-overlap branch from 8ac284e to bf35e76 Compare March 28, 2025 10:41
@mj12albert mj12albert changed the title [Slider] Clamp percentageValues in range sliders to prevent thumb overlap [Slider] Prevent range slider thumbs from being dragged past each other Mar 28, 2025
@mj12albert mj12albert merged commit f9c7f24 into mui:master Apr 1, 2025
22 checks passed
@mj12albert mj12albert deleted the fix/range-thumb-overlap branch April 1, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Slider] Range slider thumbs can be dragged past the other thumb
2 participants