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] Fix SliderValueLabel types #44131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshkel
Copy link
Contributor

@joshkel joshkel commented Oct 16, 2024

Fixes #44130

@oliviertassinari oliviertassinari changed the title Fix SliderValueLabel propTypes [slider] Fix SliderValueLabel propTypes Oct 16, 2024
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module! typescript regression A bug, but worse labels Oct 16, 2024
@oliviertassinari oliviertassinari changed the title [slider] Fix SliderValueLabel propTypes [slider] Fix SliderValueLabel types Oct 16, 2024
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool to see prop-types > types in this instance (SliderValueLabelProps is unable to update its type to match valueLabelFormat returned value). I guess we could use a generic to support this but it would complexity the types.

packages/mui-material/src/Slider/SliderValueLabel.types.ts Outdated Show resolved Hide resolved
The reference to "an array with two values" looks like it was copied and pasted from Slider's `value` prop, but for this component, value is a single item.

Co-authored-by: Olivier Tassinari <[email protected]>
Signed-off-by: Josh Kelley <[email protected]>
@aarongarciah aarongarciah changed the title [slider] Fix SliderValueLabel types [Slider] Fix SliderValueLabel types Oct 22, 2024
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! regression A bug, but worse typescript
Projects
None yet
2 participants