We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 29a021a + fbc6465 commit 49ac823Copy full SHA for 49ac823
1 file changed
packages/tree-utils/src/index.ts
@@ -156,7 +156,9 @@ export function makeTreeProcessor<T>(data: T[], opt: Options = {}) {
156
this.stats!,
157
(stat) => {
158
if (stat.children && stat.children.length > 0) {
159
- const checked = stat.children.every((v) => v.checked);
+ const allChecked = stat.children.every((v) => v.checked === true);
160
+ const allUnchecked = stat.children.every((v) => v.checked === false);
161
+ const checked = allChecked ? true : allUnchecked ? false : 0;
162
if (stat.checked !== checked) {
163
this._ignoreCheckedOnce(stat);
164
stat.checked = checked;
0 commit comments