mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Tree: when tree nodes filtered, don't expand node in lazy mode (#11395)
This commit is contained in:
@@ -32,6 +32,7 @@ export default class TreeStore {
|
||||
|
||||
filter(value) {
|
||||
const filterNodeMethod = this.filterNodeMethod;
|
||||
const lazy = this.lazy;
|
||||
const traverse = function(node) {
|
||||
const childNodes = node.root ? node.root.childNodes : node.childNodes;
|
||||
|
||||
@@ -56,7 +57,7 @@ export default class TreeStore {
|
||||
}
|
||||
if (!value) return;
|
||||
|
||||
if (node.visible && !node.isLeaf) node.expand();
|
||||
if (node.visible && !node.isLeaf && !lazy) node.expand();
|
||||
};
|
||||
|
||||
traverse(this);
|
||||
|
||||
Reference in New Issue
Block a user