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

pull/11426/head
hetech 2018-05-30 10:55:23 +08:00 committed by 杨奕
parent 089499745d
commit a230e4a0ff
1 changed files with 2 additions and 1 deletions

View File

@ -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 {
} }
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);