Skip to content

Commit 18fadbd

Browse files
committed
fix: when move tree node position code occor error #3645 #3706
1 parent 4a018fd commit 18fadbd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/vtable/src/state/checkbox/checkbox.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function setSingleCheckedState(
3636
const recordIndex = state.table.getRecordShowIndexByCell(col, row);
3737
if (recordIndex >= 0) {
3838
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
39-
if (state.checkedState.has(dataIndex)) {
39+
if (state.checkedState.get(dataIndex)) {
4040
state.checkedState.get(dataIndex)[field] = checked;
4141
} else {
4242
state.checkedState.set(dataIndex, {
@@ -89,7 +89,7 @@ export function syncCheckedState(
8989
if (isValid(state.checkedState.get(dataIndex)?.[field])) {
9090
return state.checkedState.get(dataIndex)[field];
9191
}
92-
if (state.checkedState.has(dataIndex)) {
92+
if (state.checkedState.get(dataIndex)) {
9393
state.checkedState.get(dataIndex)[field] = checked;
9494
} else if (dataIndex.includes(',')) {
9595
// child record, sync parent record state

0 commit comments

Comments
 (0)