Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Allow ignoreChildren in updateNode #347

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/js/bootstrap-treeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,11 @@
targetNodes.splice(node.index, 1, newNode);

// remove old node from DOM
this._removeNodeEl(node);
if (options.ignoreChildren){
node.$el.remove();
} else {
this._removeNodeEl(node);
}

// initialize new state and render changes
this._setInitialStates({nodes: this._tree}, 0)
Expand Down