-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TabPanel] Type mismatch between tabContext and tanPanel #44149
Comments
|
@mj12albert Yes, I'm checking out the guidelines for contribution :) |
This was fixed in #44207 |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @blackcow1987 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
According to TabPanel's type definition, value must be a string.
https://github.com/mui/material-ui/blob/v6.1.4/packages/mui-lab/src/TabPanel/TabPanel.d.ts#L24
But according to TabContext's type definition, value must be a string or number.
https://github.com/mui/material-ui/blob/v6.1.4/packages/mui-lab/src/TabContext/TabContext.d.ts#L16
When using TabContext, because the currently active tab information is stored in the Context and compared within the TabPanel component, the
value
of the two components must use the same type.https://github.com/mui/material-ui/blob/v6.1.4/packages/mui-lab/src/TabPanel/TabPanel.js#L50
Current behavior
The
value
of TabContext and TabPanel are using different types.Expected behavior
The
value
of TabContext and TabPanel must use the same type.Context
No response
Your environment
npx @mui/envinfo
Search keywords: TabPanel
The text was updated successfully, but these errors were encountered: