diff --git a/bi/base.js b/bi/base.js index 947c621acb..525841fd92 100644 --- a/bi/base.js +++ b/bi/base.js @@ -1937,6 +1937,16 @@ BI.TreeView = BI.inherit(BI.Pane, { }, checkAll: function (checked) { + function setNode(children) { + BI.each(children, function (i, child) { + child.halfCheck = false; + setNode(child.children); + }); + } + BI.each(this.nodes.getNodes(), function (i, node) { + node.halfCheck = false; + setNode(node.children); + }); this.nodes && this.nodes.checkAllNodes(checked); }, diff --git a/bi/widget.js b/bi/widget.js index f4a98a86b8..39789204c0 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -11442,9 +11442,7 @@ BI.MultiSelectTree = BI.inherit(BI.Widget, { }, setValue: function (v) { - this.adapter.setValue({ - value: v || {} - }); + this.adapter.setValue(v); }, stopSearch: function () { diff --git a/docs/base.js b/docs/base.js index 947c621acb..525841fd92 100644 --- a/docs/base.js +++ b/docs/base.js @@ -1937,6 +1937,16 @@ BI.TreeView = BI.inherit(BI.Pane, { }, checkAll: function (checked) { + function setNode(children) { + BI.each(children, function (i, child) { + child.halfCheck = false; + setNode(child.children); + }); + } + BI.each(this.nodes.getNodes(), function (i, node) { + node.halfCheck = false; + setNode(node.children); + }); this.nodes && this.nodes.checkAllNodes(checked); }, diff --git a/docs/widget.js b/docs/widget.js index f4a98a86b8..39789204c0 100644 --- a/docs/widget.js +++ b/docs/widget.js @@ -11442,9 +11442,7 @@ BI.MultiSelectTree = BI.inherit(BI.Widget, { }, setValue: function (v) { - this.adapter.setValue({ - value: v || {} - }); + this.adapter.setValue(v); }, stopSearch: function () { diff --git a/src/base/tree/treeview.js b/src/base/tree/treeview.js index 4e74c9967e..6ada95083e 100644 --- a/src/base/tree/treeview.js +++ b/src/base/tree/treeview.js @@ -436,6 +436,16 @@ BI.TreeView = BI.inherit(BI.Pane, { }, checkAll: function (checked) { + function setNode(children) { + BI.each(children, function (i, child) { + child.halfCheck = false; + setNode(child.children); + }); + } + BI.each(this.nodes.getNodes(), function (i, node) { + node.halfCheck = false; + setNode(node.children); + }); this.nodes && this.nodes.checkAllNodes(checked); }, diff --git a/src/widget/multiselecttree/multiselecttree.js b/src/widget/multiselecttree/multiselecttree.js index f51bdca39a..54653c10ff 100644 --- a/src/widget/multiselecttree/multiselecttree.js +++ b/src/widget/multiselecttree/multiselecttree.js @@ -139,9 +139,7 @@ BI.MultiSelectTree = BI.inherit(BI.Widget, { }, setValue: function (v) { - this.adapter.setValue({ - value: v || {} - }); + this.adapter.setValue(v); }, stopSearch: function () {