diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-property-structure-helper.class.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-property-structure-helper.class.ts index 3699a93cbe..8784968913 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-property-structure-helper.class.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-property-structure-helper.class.ts @@ -7,7 +7,7 @@ import type { import type { UmbContentTypeStructureManager } from './content-type-structure-manager.class.js'; import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api'; +import { UmbArrayState, mergeObservables } from '@umbraco-cms/backoffice/observable-api'; type UmbPropertyTypeId = UmbPropertyTypeModel['id']; @@ -77,7 +77,14 @@ export class UmbContentTypePropertyStructureHelper { + this.#propertyStructure.setValue(properties); + }, + 'observePropertyStructures', + ); this.removeUmbControllerByAlias('_observeContainers'); } else { this.observe( @@ -140,13 +147,24 @@ export class UmbContentTypePropertyStructureHelper this.#observePropertyStructureOf(group.id)); + this.observe( + mergeObservables( + groupContainers.map((group) => this.#structure!.propertyStructuresOf(group.id)), + (sources) => { + return sources.flatMap((x) => x); + }, + ), + (properties) => { + this.#propertyStructure.setValue(properties); + }, + 'observePropertyStructures', + ); this.#containers = groupContainers; }, '_observeContainers', ); } - + /* #observePropertyStructureOf(groupId?: string | null) { if (!this.#structure || groupId === undefined) return; @@ -164,7 +182,7 @@ export class UmbContentTypePropertyStructureHelper