Tree: delete current node after it removed (#14604)

This commit is contained in:
Jeff Wen
2019-04-22 17:38:08 +08:00
committed by hetech
parent 1967cd2b9e
commit 6ae9f0838f
2 changed files with 7 additions and 0 deletions

View File

@@ -91,7 +91,11 @@ export default class TreeStore {
remove(data) {
const node = this.getNode(data);
if (node && node.parent) {
if (node === this.currentNode) {
this.currentNode = null;
}
node.parent.removeChild(node);
}
}