Commit a230e4a0 authored by hetech's avatar hetech Committed by 杨奕

Tree: when tree nodes filtered, don't expand node in lazy mode (#11395)

parent 08949974
...@@ -32,6 +32,7 @@ export default class TreeStore { ...@@ -32,6 +32,7 @@ export default class TreeStore {
filter(value) { filter(value) {
const filterNodeMethod = this.filterNodeMethod; const filterNodeMethod = this.filterNodeMethod;
const lazy = this.lazy;
const traverse = function(node) { const traverse = function(node) {
const childNodes = node.root ? node.root.childNodes : node.childNodes; const childNodes = node.root ? node.root.childNodes : node.childNodes;
...@@ -56,7 +57,7 @@ export default class TreeStore { ...@@ -56,7 +57,7 @@ export default class TreeStore {
} }
if (!value) return; if (!value) return;
if (node.visible && !node.isLeaf) node.expand(); if (node.visible && !node.isLeaf && !lazy) node.expand();
}; };
traverse(this); traverse(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment