From f991f4c5c9002362e34a169feb6e65f6232a5afd Mon Sep 17 00:00:00 2001 From: Rajat Date: Sat, 19 Oct 2024 01:03:51 +0530 Subject: [PATCH 1/2] fix --- .../src/components/virtualization/GridMainContainer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx b/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx index c8b4ca5e33be..ea0022b76b6c 100644 --- a/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx @@ -8,6 +8,7 @@ const GridPanelAnchor = styled('div')({ position: 'absolute', top: `var(--DataGrid-headersTotalHeight)`, left: 0, + width: '100%', }); type OwnerState = DataGridProcessedProps; From 971a563fc4e61f31588105aacc228bc5deb07815 Mon Sep 17 00:00:00 2001 From: Rajat Date: Sat, 19 Oct 2024 02:07:30 +0530 Subject: [PATCH 2/2] consider scrollbar --- .../src/components/virtualization/GridMainContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx b/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx index ea0022b76b6c..70d727b3afd5 100644 --- a/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx +++ b/packages/x-data-grid/src/components/virtualization/GridMainContainer.tsx @@ -8,7 +8,7 @@ const GridPanelAnchor = styled('div')({ position: 'absolute', top: `var(--DataGrid-headersTotalHeight)`, left: 0, - width: '100%', + width: 'calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))', }); type OwnerState = DataGridProcessedProps;