@acorex/components 6.5.7 → 6.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/tree-view/tree-view.component.mjs +28 -7
- package/fesm2015/acorex-components.mjs +27 -6
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +27 -6
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/tree-view/tree-view.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -14918,6 +14918,7 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
14918
14918
|
this.showContextMenu = false;
|
|
14919
14919
|
this.isSelectedItem = false;
|
|
14920
14920
|
this.loced = false;
|
|
14921
|
+
this.levelCount = 0;
|
|
14921
14922
|
}
|
|
14922
14923
|
handleOnContextMenuItem(e) {
|
|
14923
14924
|
this.onContextMenuItemClick.emit(e);
|
|
@@ -15185,6 +15186,21 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15185
15186
|
}
|
|
15186
15187
|
}
|
|
15187
15188
|
}
|
|
15189
|
+
getLevel(item) {
|
|
15190
|
+
return new Promise((resolve, reject) => {
|
|
15191
|
+
debugger;
|
|
15192
|
+
if (item.parentNode) {
|
|
15193
|
+
this.levelCount = this.levelCount + 1;
|
|
15194
|
+
this.getLevel(item.parentNode).then((res) => {
|
|
15195
|
+
resolve(this.levelCount);
|
|
15196
|
+
});
|
|
15197
|
+
}
|
|
15198
|
+
else {
|
|
15199
|
+
this.levelCount = this.levelCount + 1;
|
|
15200
|
+
resolve(this.levelCount);
|
|
15201
|
+
}
|
|
15202
|
+
});
|
|
15203
|
+
}
|
|
15188
15204
|
ngAfterContentInit() {
|
|
15189
15205
|
this._contentDataSource.fetch(null);
|
|
15190
15206
|
this._contentDataSource.onDataReceived.subscribe((_data) => {
|
|
@@ -15204,7 +15220,7 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15204
15220
|
this.seletedKeyFields.forEach((n) => {
|
|
15205
15221
|
if (n.includes(el[this.keyField])) {
|
|
15206
15222
|
if (el[this.hasChildField] == true) {
|
|
15207
|
-
if ((this.checkParents == false && this.checkChilds == false) || this.checkChilds == false) {
|
|
15223
|
+
if (((this.checkParents == false && this.checkChilds == false) || this.checkChilds == false) && n.length == 1) {
|
|
15208
15224
|
//select parent when check child and check parent is false TODO check this Action
|
|
15209
15225
|
this.selectItem(el);
|
|
15210
15226
|
}
|
|
@@ -15279,11 +15295,16 @@ class AXTreeViewComponent extends AXBaseComponent {
|
|
|
15279
15295
|
this.seletedKeyFields.forEach((n) => {
|
|
15280
15296
|
if (n.includes(result[i][this.keyField])) {
|
|
15281
15297
|
if (result[i][this.hasChildField] == true) {
|
|
15282
|
-
|
|
15283
|
-
|
|
15284
|
-
|
|
15285
|
-
|
|
15286
|
-
|
|
15298
|
+
this.levelCount = 0;
|
|
15299
|
+
debugger;
|
|
15300
|
+
this.getLevel(result[i]).then((resLevel) => {
|
|
15301
|
+
debugger;
|
|
15302
|
+
if (this.checkParents == false && this.checkChilds == false && n.length == this.levelCount) {
|
|
15303
|
+
//select parent when check child and check parent is false TODO check this Action
|
|
15304
|
+
this.selectItem(result[i]);
|
|
15305
|
+
}
|
|
15306
|
+
this.open(result[i]);
|
|
15307
|
+
});
|
|
15287
15308
|
}
|
|
15288
15309
|
else {
|
|
15289
15310
|
this.selectItem(result[i]);
|