From ec7fc588b8cc06218a5cfc1e6fc0188a95060cba Mon Sep 17 00:00:00 2001 From: Kenan Yusuf Date: Thu, 21 Nov 2024 15:39:33 +0000 Subject: [PATCH] [DataGrid] Fix last separator not being hidden when grid is scrollable --- .../src/hooks/features/columnHeaders/useGridColumnHeaders.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx b/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx index d72882be17544..2e9804d6c51fb 100644 --- a/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx +++ b/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx @@ -456,7 +456,7 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { fields={headerInfo.fields} colIndex={headerInfo.colIndex} depth={depth} - isLastColumn={headerInfo.colIndex === visibleColumns.length - headerInfo.fields.length} + isLastColumn={index === visibleColumnGroupHeader.length - 1} maxDepth={headerGroupingMaxDepth} height={dimensions.groupHeaderHeight} hasFocus={hasFocus}