-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] rendering complex components in a cell push pieces to following rows #12642
Comments
This is due to the renderCell: (params) => (
<Stack>
<Box sx={{ lineHeight: 'initial' }}>{params.row.lastName}</Box>
<Box sx={{ lineHeight: 'initial' }}>{params.row.lastName}</Box>
</Stack>
), |
This worked, along with adding This wasn't required prior to the 7.0.0 update - probably too niche a case for this to be considered a breaking change, but it does seem like a pretty big departure from how this operated before. Anyway, thanks for your help! |
Glad that this solution helped you. I can understand that it is a bit inconsistent, but the changes had their reasoning. If I remember correctly it was due to a refactor of the scrolling logic. I will close this now as the opening question got solved. |
Steps to reproduce
Link to live example: (required)
Steps:
renderCell
to thelastName
columnCurrent behavior
Any component after the first is being rendered on the next row, instead of inside of the particular cell
Expected behavior
In the above example, the last name should be rendered twice in a vertical stack fully contained within each row's last name cell. If rendered more times than can fit, the row should expand vertically to fit it.
Context
Just trying to render more complex information inside of a single cell. This worked fin before the v7.0.0 release.
Your environment
System:
OS: macOS 14.0
Binaries:
Node: 18.12.0 - ~/.nvm/versions/node/v18.12.0/bin/node
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.0/bin/npm
pnpm: 8.14.3 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 123.0.6312.87
Edge: Not Found
Safari: 17.0
npmPackages:
@emotion/react: 11.11.4 => 11.11.4
@emotion/styled: 11.11.0 => 11.11.0
@mui/base: 5.0.0-beta.40
@mui/core-downloads-tracker: 5.15.14
@mui/icons-material: 5.15.14 => 5.15.14
@mui/material: 5.15.14 => 5.15.14
@mui/private-theming: 5.15.14
@mui/styled-engine: 5.15.14
@mui/system: 5.15.14
@mui/types: 7.2.14
@mui/utils: 5.15.14
@mui/x-charts: 7.0.0 => 7.0.0
@mui/x-data-grid: 7.0.0
@mui/x-data-grid-pro: 7.0.0 => 7.0.0
@mui/x-date-pickers: 7.0.0 => 7.0.0
@mui/x-date-pickers-pro: 7.0.0 => 7.0.0
@mui/x-license: 7.0.0 => 7.0.0
@types/react: 18.2.73 => 18.2.73
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: 5.4.3 => 5.4.3
Search keywords: data grid, render cell
The text was updated successfully, but these errors were encountered: