Skip to content

Commit

Permalink
fix: fix no records in initRecordCheckState()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Dec 20, 2024
1 parent 63b40e7 commit ea50d63
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/vtable/src/state/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,13 @@ function initRecordCheckState(records: any[], state: StateManager) {
: table.internalProps.transpose
? table.rowHeaderLevelCount
: table.columnHeaderLevelCount;
const end = table.isPivotTable() ? records.length : table.internalProps.transpose ? table.colCount : table.rowCount;
const end = table.isPivotTable()
? isArray(records)
? records.length
: 0
: table.internalProps.transpose
? table.colCount
: table.rowCount;
for (let index = 0; index + start < end; index++) {
const record = table.isPivotTable() ? records[index] : table.dataSource.get(index);
// eslint-disable-next-line no-loop-func
Expand Down

0 comments on commit ea50d63

Please sign in to comment.