Browse Source

Tree: select fix

Dreamacro 8 năm trước cách đây
mục cha
commit
e001f81a88
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      packages/tree/src/model/node.js

+ 2 - 2
packages/tree/src/model/node.js

@@ -300,9 +300,9 @@ export default class Node {
   setChecked(value, deep, recursion, passValue) {
     this.indeterminate = value === 'half';
     this.checked = value === true;
-    let { allWithoutDisable } = getChildState(this.childNodes);
+    let { all, allWithoutDisable } = getChildState(this.childNodes);
 
-    if (this.childNodes.length && allWithoutDisable) {
+    if (this.childNodes.length && (!all && allWithoutDisable)) {
       this.checked = false;
       value = false;
     }