From 992bd6de27c443f1a30ded9ad02b54b570f7cf03 Mon Sep 17 00:00:00 2001 From: zalsader Date: Mon, 10 Apr 2017 18:31:50 +0300 Subject: [PATCH] Keep node children on node update --- src/js/bootstrap-treeview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/bootstrap-treeview.js b/src/js/bootstrap-treeview.js index 820a1f941..3741af717 100644 --- a/src/js/bootstrap-treeview.js +++ b/src/js/bootstrap-treeview.js @@ -1230,7 +1230,9 @@ targetNodes.splice(node.index, 1, newNode); // remove old node from DOM - this._removeNodeEl(node); + if (node.$el !== newNode.$el) { + this._removeNodeEl(node); + } // initialize new state and render changes this._setInitialStates({nodes: this._tree}, 0)