don't wait for tree before showing notification

This commit is contained in:
Mads Rasmussen
2023-09-14 12:17:30 +02:00
parent a62cc46176
commit bc99862cf4

View File

@@ -178,12 +178,12 @@ export class UmbDocumentRepository
this.#store?.append(item);
// TODO: Update tree store with the new item? or ask tree to request the new item?
// TODO: Revisit this call, as we should be able to update tree on client.
await this.requestRootTreeItems();
const notification = { data: { message: `Document created` } };
this.#notificationContext?.peek('positive', notification);
// TODO: Revisit this call, as we should be able to update tree on client.
await this.requestRootTreeItems();
return { data: item };
}
@@ -206,11 +206,11 @@ export class UmbDocumentRepository
//this.#treeStore?.updateItem(item.id, { name: item.name });// Port data to tree store.
// TODO: would be nice to align the stores on methods/methodNames.
// TODO: Revisit this call, as we should be able to update tree on client.
await this.requestRootTreeItems();
const notification = { data: { message: `Document saved` } };
this.#notificationContext?.peek('positive', notification);
// TODO: Revisit this call, as we should be able to update tree on client.
await this.requestRootTreeItems();
}
return { error };