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

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

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 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
@ZeeshanTamboli ZeeshanTamboli changed the title [Slider] Fix SliderValueLabel types [material-ui][Slider] Fix SliderValueLabel value type Oct 26, 2024
@ZeeshanTamboli ZeeshanTamboli added the package: material-ui Specific to @mui/material label 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
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! package: material-ui Specific to @mui/material regression A bug, but worse typescript
Projects
None yet
4 participants