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] Thumb position doesn't update on external value change when controlled #1406

Open
jaggaer-mplanic opened this issue Feb 3, 2025 · 1 comment
Assignees
Labels
bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module!

Comments

@jaggaer-mplanic
Copy link

jaggaer-mplanic commented Feb 3, 2025

Bug report

Current behavior

Slider component, when used as controlled component does not update its value on state change outside of its self.

Here is example where state is changed on button click but slider still shows initial value even it is passed as value prop

Image

Expected behavior

Slider should be updated, thumb should be moved to the new position according to new value of the state.

Reproducible example

Link to a CodeSandbox Example

Base UI version

1.0.0-alpha.5

Which browser are you using?

Chrome, Firefox

Which OS are you using?

Mac OS

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 3, 2025
@mj12albert mj12albert self-assigned this Feb 3, 2025
@mj12albert mj12albert added component: slider This is the name of the generic UI component, not the React module! bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 3, 2025
@mj12albert mj12albert changed the title [Slider] Controlled component does not updates on state change [Slider] Thumb position doesn't update on external value change when controlled Feb 3, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Base UI Feb 3, 2025
@mj12albert mj12albert moved this from Backlog to Selected in Base UI Feb 3, 2025
@mj12albert
Copy link
Member

Thanks for reporting this @jaggaer-mplanic, it's a bug (related to #1360)

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
Status: Selected
Development

No branches or pull requests

2 participants