petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.26k stars 301 forks source link

[BUG] MUI Tabs renders only the first Tab #949

Closed Caliimon closed 1 year ago

Caliimon commented 1 year ago

Describe the bug Virtuoso only passes one child element to MUI Tabs component and thus only renders one Tab.

Reproduction CodeSandBox

To Reproduce Steps to reproduce the behavior:

  1. Create virtualized React component with Virtuoso
  2. Pass MUI Tabs to 'List' component key
  3. Pass MUI Tab to 'Item' component key

Expected behavior All Tabs should be rendered, not just the first. If you uncomment lines 42 - 46, wait for the List to render correctly, then comment lines 42 - 46 again, all Tabs should render correctly.

Desktop:

petyosi commented 1 year ago

The two components are not compatible with each other. You can compare what you have with the rendering of the normal virtuoso component to see why.

Caliimon commented 1 year ago

Thanks for your response, appreciate it! Is any other Virtuoso component compatible with MUI Tabs?