Skip to content

Commit 1b517d6

Browse files
authored
fix: DH-21367: Fix shifting header group text (#2603)
Fix header group calculation when child columns are scrolled out of the viewport. Fall back to calculated value before the theme default column width.
1 parent 7b2a23e commit 1b517d6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/grid/src/GridRenderer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ export class GridRenderer {
13921392
let columnIndex = startIndex;
13931393

13941394
while (columnIndex <= endIndex) {
1395-
const { columnCount } = metrics;
1395+
const { columnCount, calculatedColumnWidths } = metrics;
13961396
const modelColumn = getOrThrow(modelColumns, columnIndex);
13971397
const columnGroupName = model.textForColumnHeader(modelColumn, depth);
13981398
const columnGroupColor = model.colorForColumnHeader(modelColumn, depth);
@@ -1425,6 +1425,7 @@ export class GridRenderer {
14251425
const prevColumnWidth =
14261426
userColumnWidths.get(prevModelIndex) ??
14271427
allColumnWidths.get(prevColumnIndex) ??
1428+
calculatedColumnWidths.get(prevModelIndex) ??
14281429
columnWidth;
14291430

14301431
columnGroupLeft -= prevColumnWidth;

0 commit comments

Comments
 (0)