From d77dedcd05ccf3efda4669223f9c548dd9444abe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:49:02 +0000 Subject: [PATCH] [DataGrid] Fix last separator not being hidden when grid is scrollable (@KenanYusuf) (#15551) Co-authored-by: Kenan Yusuf --- .../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 d72882be1754..2e9804d6c51f 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}