From e7fde8c01f4df9f707283418fc6998f6170b64b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 6 Oct 2025 11:43:10 +0200 Subject: [PATCH] Entity-Action Bundle: Ensure First Action are updated in rendering (#20351) ensure requesting rendering update --- .../entity-actions-bundle/entity-actions-bundle.element.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index 682ac057f9..33904c550d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -77,9 +77,11 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { (ext) => ext.forEntityTypes.includes(this.entityType!), async (actions) => { this._numberOfActions = actions.length; + const oldFirstManifest = this._firstActionManifest; this._firstActionManifest = this._numberOfActions > 0 ? (actions[0].manifest as ManifestEntityActionDefaultKind) : undefined; - this.#createFirstActionApi(); + await this.#createFirstActionApi(); + this.requestUpdate('_firstActionManifest', oldFirstManifest); }, 'umbEntityActionsObserver', ); @@ -89,6 +91,7 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { async #createFirstActionApi() { if (!this._firstActionManifest) return; + const oldFirstApi = this._firstActionApi; this._firstActionApi = await createExtensionApi(this, this._firstActionManifest, [ { unique: this.unique, entityType: this.entityType, meta: this._firstActionManifest.meta }, ]); @@ -96,6 +99,7 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { (this._firstActionApi as any).manifest = this._firstActionManifest; this._firstActionHref = await this._firstActionApi.getHref(); } + this.requestUpdate('_firstActionApi', oldFirstApi); } async #onFirstActionClick(event: PointerEvent) {