|
|
@@ -352,9 +352,8 @@ const createNewPathTree = function (type, setting) {
|
|
|
}
|
|
|
};
|
|
|
this.nodes = [];
|
|
|
- if (!isResort) {
|
|
|
- this.children = this.getChildren();
|
|
|
- } else {
|
|
|
+ this.children = this.getChildren();
|
|
|
+ if (isResort) {
|
|
|
this.sortByOrder(this.children);
|
|
|
}
|
|
|
addSortNodes(this.children);
|
|
|
@@ -813,8 +812,8 @@ const createNewPathTree = function (type, setting) {
|
|
|
for (const prop in data) {
|
|
|
if (data[prop] !== undefined && data[prop] !== node[prop]) {
|
|
|
if (prop === this.setting.pid) {
|
|
|
- loadedData.push(this.getItems(node[this.setting.pid]));
|
|
|
- loadedData.push(this.getItems(data[this.setting.pid]));
|
|
|
+ if (node[this.setting.pid] !== this.setting.rootId) loadedData.push(this.getItems(node[this.setting.pid]));
|
|
|
+ if (data[this.setting.pid] !== this.setting.rootId) loadedData.push(this.getItems(data[this.setting.pid]));
|
|
|
}
|
|
|
// if (prop === this.setting.order) {
|
|
|
// loadedData = loadedData.concat(this.getPosterity(node));
|