fix(core-app): CB-1881 nav node info update

This commit is contained in:
Wroud
2022-04-06 16:24:35 +03:00
parent a33a9bbf15
commit f91e75f00d
2 changed files with 5 additions and 4 deletions
@@ -128,8 +128,8 @@ export function useElementsTree(options: IOptions): IElementsTree {
const nextChildren: string[] = [];
for (const child of children) {
await navNodeInfoResource.waitLoad();
await navTreeResource.waitLoad();
await navNodeInfoResource.waitLoad();
const expanded = elementsTree.isNodeExpanded(child, true);
if (!expanded && child !== options.root) {
@@ -40,6 +40,8 @@ export class NavNodeInfoResource extends CachedMapResource<string, NavNode> {
makeObservable(this, {
setDetails: action,
updateNode: action,
setParent: action,
});
this.metadata = new MetadataMap<string, INodeMetadata>(() => ({
@@ -72,10 +74,9 @@ export class NavNodeInfoResource extends CachedMapResource<string, NavNode> {
if (keyList.length > 0) {
this.set(resourceKeyList(keyList), values);
} else {
this.markUpdated(key);
this.onItemAdd.execute(key);
}
this.markUpdated(key);
this.onItemAdd.execute(key);
}
setDetails(keyObject: ResourceKey<string>, state: boolean): void {