Ensure entity structure is reloaded after publish

This commit is contained in:
Mads Rasmussen
2024-07-01 10:39:42 +02:00
committed by Jacob Overgaard
parent 8b0ccd4e71
commit 9e5ad0d256

View File

@@ -589,7 +589,6 @@ export class UmbDocumentWorkspaceContext
this.#persistedData.setValue(data);
this.#currentData.setValue(data);
// TODO: this might not be the right place to alert the tree, but it works for now
const eventContext = await this.getContext(UMB_ACTION_EVENT_CONTEXT);
const event = new UmbRequestReloadChildrenOfEntityEvent({
entityType: parent.entityType,
@@ -718,6 +717,14 @@ export class UmbDocumentWorkspaceContext
unique,
variantIds.map((variantId) => ({ variantId })),
);
const eventContext = await this.getContext(UMB_ACTION_EVENT_CONTEXT);
const event = new UmbRequestReloadStructureForEntityEvent({
unique: this.getUnique()!,
entityType: this.getEntityType(),
});
eventContext.dispatchEvent(event);
}
async #handleSave() {