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 ee5325a7ad5b..d72882be1754 100644 --- a/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx +++ b/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx @@ -464,7 +464,7 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { pinnedPosition={pinnedPosition} style={style} indexInSection={indexInSection} - sectionLength={rowStructure.length} + sectionLength={visibleColumnGroupHeader.length} gridHasFiller={gridHasFiller} /> );