-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Steps to reproduce
Steps:
- Open this link to live example: https://stackblitz.com/edit/react-ecztqxbj?file=Demo.tsx
- Click console
- Edit something to trigger a rerender
- Console is displaying error
Current behavior
When using DataGrid with getRowHeight={() => 'auto'} it cause a console error:
`MUI X: useResizeContainer - The parent DOM element of the Data Grid has an empty height.
Please make sure that this element has an intrinsic height.
The grid displays with a height of 0px.
More details: https://mui.com/r/x-data-grid-no-dimensions.`
The same error is shown on https://mui.com/x/react-data-grid/row-height/?srsltid=AfmBOooQ_3d893AapCP7zR-gxCi4zXvjLyh8CAr4U58Yip2NYOk9pf1l#dynamic-row-height
Expected behavior
When using DataGrid with getRowHeight={() => 'auto'} it should not cause a console error.
Context
The DataGrid component with getRowHeight={() => 'auto'} works as expected but still render error in console.
Your environment
npx @mui/envinfo
System:
OS: Linux 6.8 Linux Mint 21.3 (Virginia)
Binaries:
Node: 21.6.0 - ~/.nvm/versions/node/v21.6.0/bin/node
npm: 10.2.4 - ~/.nvm/versions/node/v21.6.0/bin/npm
pnpm: Not Found
Browsers:
Chrome: 134.0.6998.35
Search keywords: DataGrid getRowHeight useResizeContainer
Order ID: 61657