mui / material-ui

MaterialΒ UI: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
https://mui.com/material-ui/
MIT License
92.04k stars 31.64k forks source link

MUI: The `value` provided to the Tabs component is invalid.... #32749

Closed MatthewMcP closed 2 years ago

MatthewMcP commented 2 years ago

Duplicates

Latest version

Current behavior 😯

When using the tabs component I get,

Tabs.js:366 MUI: The value provided to the Tabs component is invalid. The Tab with this value ("0") is not part of the document layout. Make sure the tab item is present in the document or that it's not display: none.

This occurs both in my own code, and when I copy examples from https://mui.com/material-ui/react-tabs/#experimental-api

There is some stack overflow questions but no solutions https://stackoverflow.com/questions/72085892/mui-the-value-provided-to-the-tabs-component-is-invalid-the-tab-with-this-v https://stackoverflow.com/questions/71613867/mui-nested-tabs-error-the-value-provided-to-the-tabs-component-is-invalid

Expected behavior πŸ€”

No response

Steps to reproduce πŸ•Ή

Steps:

1. 2. 3. 4.

Context πŸ”¦

No response

Your environment 🌎

`npx @mui/envinfo` ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```
mimiqkz commented 4 months ago

How and why is this marked as "Closed" the problem still exist

Revarh commented 4 months ago

In my case I was indeed using style={{ display: 'none' }} so I replaced it with style={{ visibility: 'hidden' }}

shamilium commented 3 months ago

I have same problem, but i use TabList - it doesn't have value prop at all.

sinhgithub commented 1 month ago

I have added <Tab value={"100000"} sx={{ position: "fixed", top: "-20000000px", left: "-20000000px", }} /> πŸ˜‚πŸ˜‚πŸ˜‚