Skip to content

Conversation

blackcow1987
Copy link
Contributor

@blackcow1987 blackcow1987 commented Oct 25, 2024

change the value type of TabPanel component from string to string | number

@mui-bot
Copy link

mui-bot commented Oct 25, 2024

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against dc497aa

@aarongarciah aarongarciah added the scope: tabs Changes related to the tabs. label Oct 25, 2024
@aarongarciah aarongarciah changed the title [material-ui][[Tabs] fix type of TabPanel component(#44149) [material-ui][Tabs] Fix type of TabPanel component Oct 25, 2024
@zannager zannager requested a review from siriwatknp October 25, 2024 10:29
@aarongarciah
Copy link
Member

Hey @blackcow1987, thanks for opening the PR. May I ask why do you need this change?

If we change the type of the value prop, I think we should consider unknown as we do in other components like Switch, TextInput, etc. Thoughts @mnajdova?

@aarongarciah aarongarciah requested review from aarongarciah and removed request for siriwatknp October 25, 2024 11:23
@blackcow1987
Copy link
Contributor Author

@aarongarciah The reason why we need to change the type of value is because a warning occurs due to a type mismatch with the TabContext component.

Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I see that #40829 introduced this change for TabContext; we should've introduced it in TabPanel back then.

@aarongarciah aarongarciah merged commit c4b48a6 into mui:master Oct 28, 2024
22 of 23 checks passed
@blackcow1987 blackcow1987 deleted the fix-tabpanel-type branch October 28, 2024 07:37
@ZeeshanTamboli ZeeshanTamboli added the package: lab Specific to the lab. label Oct 30, 2024
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Tabs] Fix type of TabPanel component [lab][Tabs] Fix type of TabPanel component Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: lab Specific to the lab. scope: tabs Changes related to the tabs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants