Skip to content

Commit eb6eb1a

Browse files
committed
fix: updateChecked
1 parent b92268b commit eb6eb1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/HeTree.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -980,12 +980,12 @@ export function updateCheckedInFlatData<T extends Record<Id, any>>(
980980
let hasFalse = false
981981
let hasNull = false
982982
for (const childId of childIds) {
983+
// must loop all, must call walk on every child
983984
let t = walk(childId)
984985
if (t === false) {
985986
hasFalse = true
986987
} else if (t === null) {
987988
hasNull = true
988-
break
989989
} else {
990990
hasTrue = true
991991
}
@@ -1057,12 +1057,12 @@ export function updateCheckedInTreeData<T extends Record<Id, any>>(
10571057
let hasFalse = false
10581058
let hasNull = false
10591059
for (const childId of childIds) {
1060+
// must loop all, must call walk on every child
10601061
let t = walk(childId)
10611062
if (t === false) {
10621063
hasFalse = true
10631064
} else if (t === null) {
10641065
hasNull = true
1065-
break
10661066
} else {
10671067
hasTrue = true
10681068
}

0 commit comments

Comments
 (0)