From e384a2687a0b4588021a51ed7e125d13e3f477ce Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 29 Mar 2023 10:46:13 +0200 Subject: [PATCH] fix observe actions when the tree item is set --- .../tree/tree-item-base/tree-item-base.context.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/tree/tree-item-base/tree-item-base.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/tree/tree-item-base/tree-item-base.context.ts index 25c3a500cb..7216fb0683 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/tree/tree-item-base/tree-item-base.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/tree/tree-item-base/tree-item-base.context.ts @@ -15,6 +15,7 @@ import { } from '@umbraco-cms/backoffice/context-api'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extensions-api'; import type { TreeItemPresentationModel } from '@umbraco-cms/backoffice/backend-api'; +import { ManifestEntityAction } from 'libs/extensions-registry/entity-action.models'; // add type for unique function export type UmbTreeItemUniqueFunction = (x: T) => string | null | undefined; @@ -54,11 +55,11 @@ export class UmbTreeItemContextBase; + #actionObserver?: UmbObserverController; constructor(host: UmbControllerHostInterface, getUniqueFunction: UmbTreeItemUniqueFunction) { this.host = host; this.#getUniqueFunction = getUniqueFunction; - this.#observeTreeItemActions(); this.#consumeContexts(); new UmbContextProviderController(host, UMB_TREE_ITEM_CONTEXT_TOKEN, this); } @@ -77,6 +78,7 @@ export class UmbTreeItemContextBase