Skip to content
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

fix(mui): broken <DataGrid /> sizing in <ThemedLayoutV2 /> #6144

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/cold-olives-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@refinedev/mui": patch
---

fix(mui): <DataGrid /> horizontal scroll is broken in <ThemedLayoutV2 />

Due to the changes in CSS rendering in latest Google Chrome updates, `<DataGrid />` components are not properly sized when used inside `<ThemedLayoutV2 />` component. The `overflow: clip` property in the layout content is causing either miscalculations on the data grid width or causing an overflow on the container and overlapping with the sidebar.

This change replaces the `overflow: clip` property with `min-height` and `min-width` properties to ensure the layout content is properly rendered and responsive to the content inside it.

[Resolves #6077](https://github.com/refinedev/refine/issues/6077)
5 changes: 2 additions & 3 deletions packages/mui/src/components/themedLayoutV2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ export const ThemedLayoutV2: React.FC<RefineThemedLayoutV2Props> = ({
display: "flex",
flexDirection: "column",
flex: 1,
minHeight: "100vh",
minWidth: "1px",
minHeight: "1px",
},
{ overflow: "auto" },
{ overflow: "clip" },
]}
>
<HeaderToRender />
Expand Down
Loading