SUPPORT-8728: fix case parent id = self id;

+ add sort order
This commit is contained in:
Рауф Латыпов 2024-12-08 01:42:21 +03:00
parent 2c8ef2bf75
commit 88ef5237a7
3 changed files with 31 additions and 21 deletions

View file

@ -57,7 +57,7 @@ export class DropdownTreeViewComponent extends InputControl {
this.items = res.map(value => new TreeviewItem(this.createTreeItem(value)));
const rootItem = this.items[0];
this.i18n.selectedItem = rootItem;
this.value = rootItem.value;
this.value = rootItem ? rootItem.value : rootItem;
this.doCollapseLevel();
this.cd.markForCheck();
});