Skip to content

[material-ui][Slider] Fix value prop type warning #44131

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

Merged
merged 8 commits into from
Oct 26, 2024

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 type: bug It doesn't behave as expected. scope: slider Changes related to the slider. typescript type: regression A bug, but worse, it used to behave as expected. 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.

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
@ZeeshanTamboli ZeeshanTamboli changed the title [Slider] Fix SliderValueLabel types [material-ui][Slider] Fix SliderValueLabel value type Oct 26, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Slider] Fix SliderValueLabel value type [material-ui][Slider] Fix SliderValueLabel value proptype warning Oct 26, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Slider] Fix SliderValueLabel value proptype warning [material-ui][Slider] Fix value prop type warning Oct 26, 2024
@mui-bot
Copy link

mui-bot commented Oct 26, 2024

Netlify deploy preview

https://deploy-preview-44131--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against eee1d2d

Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

@joshkel I pushed few changes. Thanks for the pull request.

@ZeeshanTamboli ZeeshanTamboli merged commit 758cdec into mui:master Oct 26, 2024
22 checks passed
@joshkel joshkel deleted the slide-value-label-prop-types branch October 28, 2024 13:51
@oliviertassinari oliviertassinari removed the type: bug It doesn't behave as expected. label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: slider Changes related to the slider. type: regression A bug, but worse, it used to behave as expected. typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui][Slider] Incorrect warning: "Invalid prop value of type string supplied to MuiSliderValueLabel, expected number"
4 participants