After I recently upgraded my MUI X packages. I see the following 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.
However, I can see the table is working fine but the error still persists. How can I get away of this error?
Code:
"use client";
import '../ui/global.css'
import Typography from '@mui/material/Typography';
import Button from '@mui/material/Button';
import { DataGrid } from "@mui/x-data-grid";
export default function Page() {
// dummy data from tutorial
const rows = [
{ id: 1, name: "John Doe", age: 25 },
{ id: 2, name: "Jane Smith", age: 30 },
{ id: 3, name: "Sam Wilson", age: 35 },
];
const columns = [
{ field: "id", headerName: "ID", width: 70 },
{ field: "name", headerName: "Name", width: 150 },
{ field: "age", headerName: "Age", width: 100 },
];
return (
<div style={{ display: 'flex', flexDirection: 'column' }}>
<DataGrid rows={rows} columns={columns} />
</div>
)
}
My packages (package.json):
{
"dependencies": {
"@emotion/cache": "^11.13.1",
"@emotion/react": "^11.13.3",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.13.0",
"@fontsource/roboto": "^5.1.0",
"@mui/icons-material": "^7.3.1",
"@mui/material": "^7.3.1",
"@mui/material-nextjs": "^7.3.0",
"@mui/x-charts": "^8.10.0",
"@mui/x-data-grid": "^8.10.0",
"@mui/x-date-pickers": "^8.10.0",
"dayjs": "^1.11.13",
"next": "^15.1.8",
"next-ws": "^2.0.7",
"python-shell": "^5.0.0",
"react": "^19.0.0-rc.1",
"react-dom": "^19.0.0-rc.1",
"react-py": "^1.11.2",
"ts-node": "^10.9.2",
"ws": "^8.18.0"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"devDependencies": {
"@types/node": "24.2.0",
"@types/react": "19.1.9",
"eslint": "9.32.0",
"eslint-config-next": "15.4.6",
"typescript": "5.9.2"
}
}