Skip to content

Commit a230e4a

Browse files
ziyoungLeopoldthecoder
authored andcommitted
Tree: when tree nodes filtered, don't expand node in lazy mode (#11395)
1 parent 0894997 commit a230e4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/tree/src/model/tree-store.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default class TreeStore {
3232

3333
filter(value) {
3434
const filterNodeMethod = this.filterNodeMethod;
35+
const lazy = this.lazy;
3536
const traverse = function(node) {
3637
const childNodes = node.root ? node.root.childNodes : node.childNodes;
3738

@@ -56,7 +57,7 @@ export default class TreeStore {
5657
}
5758
if (!value) return;
5859

59-
if (node.visible && !node.isLeaf) node.expand();
60+
if (node.visible && !node.isLeaf && !lazy) node.expand();
6061
};
6162

6263
traverse(this);

0 commit comments

Comments
 (0)