diff --git a/packages/s2-core/src/facet/header/row.ts b/packages/s2-core/src/facet/header/row.ts index 7c4e2b172a..a8a975b99a 100644 --- a/packages/s2-core/src/facet/header/row.ts +++ b/packages/s2-core/src/facet/header/row.ts @@ -54,9 +54,14 @@ export class RowHeader extends BaseHeader { return this; } + protected getCustomRowCell() { + const { spreadsheet } = this.headerConfig; + return spreadsheet?.facet?.cfg?.rowCell; + } + protected layout() { const { data, spreadsheet } = this.headerConfig; - const rowCell = spreadsheet?.facet?.cfg?.rowCell; + const rowCell = this.getCustomRowCell(); each(data, (item: Node) => { if (this.rowCellInRect(item) && item.height !== 0) { let cell: S2CellType; diff --git a/packages/s2-core/src/facet/header/series-number.ts b/packages/s2-core/src/facet/header/series-number.ts index 09f541735b..61ec5dd461 100644 --- a/packages/s2-core/src/facet/header/series-number.ts +++ b/packages/s2-core/src/facet/header/series-number.ts @@ -46,6 +46,7 @@ export class SeriesNumberHeader extends BaseFrozenRowHeader { : node.height; sNode.width = seriesNumberWidth; sNode.rowIndex = node.rowIndex; + sNode.spreadsheet = spreadsheet; sNode.isLeaf = true; seriesNodes.push(sNode); }); @@ -84,4 +85,8 @@ export class SeriesNumberHeader extends BaseFrozenRowHeader { frozenRow, ); } + + protected override getCustomRowCell() { + return null; + } }