Skip to content

Commit f179464

Browse files
authored
Merge pull request #3709 from VisActor/3645-bug-tree-node-move-position-error
3645 bug tree node move position error
2 parents 865ea4f + 04aae32 commit f179464

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "fix: when move tree node position code occor error #3645 #3706\n\n",
5+
"type": "none",
6+
"packageName": "@visactor/vtable"
7+
}
8+
],
9+
"packageName": "@visactor/vtable",
10+
"email": "892739385@qq.com"
11+
}

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)