|
|
@@ -250,6 +250,10 @@ const pmTree = {
|
|
|
node.parent.children.splice(iIndex, 1);
|
|
|
}
|
|
|
sortTreeItems(this);
|
|
|
+ this.sourceData = this.items.reduce((acc, cur) => {
|
|
|
+ acc.push(cur.data);
|
|
|
+ return acc;
|
|
|
+ }, []);
|
|
|
};
|
|
|
|
|
|
Tree.prototype.loadData = function (arrData) {
|
|
|
@@ -319,6 +323,7 @@ const pmTree = {
|
|
|
};
|
|
|
|
|
|
Tree.prototype.addNodeData = function (data, parent, nextSibling, nodeState = null) {
|
|
|
+ this.sourceData.push(data);
|
|
|
var node = null;
|
|
|
var pNode = parent ? parent : this._root;
|
|
|
if (!nextSibling || (nextSibling.parent === pNode && pNode.childIndex(nextSibling) > -1)) {
|