Skip to content

Commit

Permalink
fix: isColumnHeader api judement logic #2491
Browse files Browse the repository at this point in the history
  • Loading branch information
fangsmile committed Oct 23, 2024
1 parent 8adead0 commit 6851b4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/vtable/src/layout/pivot-header-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,11 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
return false;
}
isColumnHeader(col: number, row: number): boolean {
if (col >= this.rowHeaderLevelCount && row >= 0 && row < this.columnHeaderLevelCount) {
if (
col >= this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount &&
row >= 0 &&
row < this.columnHeaderLevelCount
) {
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/state/select/update-position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export function updateSelectPosition(
});
} else {
state.select.ranges.push({
start: { col: 0, row: 0 },
start: { col: table.leftRowSeriesNumberCount, row: 0 },
end: { col: table.colCount - 1, row: table.rowCount - 1 },
skipBodyMerge: true
});
Expand Down

0 comments on commit 6851b4c

Please sign in to comment.