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 d146a8aa59..d963a30df3 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 @@ -1,4 +1,5 @@ import type { UmbEntityAction } from '@umbraco-cms/backoffice/entity-action'; +import type { PropertyValueMap } from '@umbraco-cms/backoffice/external/lit'; import { html, nothing, customElement, property, state, ifDefined } from '@umbraco-cms/backoffice/external/lit'; import type { UmbSectionSidebarContext } from '@umbraco-cms/backoffice/section'; import { UMB_SECTION_SIDEBAR_CONTEXT } from '@umbraco-cms/backoffice/section'; @@ -9,18 +10,8 @@ import { createExtensionApi } from '@umbraco-cms/backoffice/extension-api'; @customElement('umb-entity-actions-bundle') export class UmbEntityActionsBundleElement extends UmbLitElement { - private _entityType?: string; @property({ type: String, attribute: 'entity-type' }) - public get entityType() { - return this._entityType; - } - public set entityType(value: string | undefined) { - const oldValue = this._entityType; - if (oldValue === value) return; - this._entityType = value; - this.#observeEntityActions(); - this.requestUpdate('entityType', oldValue); - } + entityType?: string; @property({ type: String }) unique?: string | null; @@ -47,6 +38,12 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { }); } + protected updated(_changedProperties: PropertyValueMap | Map): void { + if (_changedProperties.has('entityType') && _changedProperties.has('unique')) { + this.#observeEntityActions(); + } + } + #observeEntityActions() { this.observe( umbExtensionsRegistry.byType('entityAction'),