From 8d25b19bfa29dfc7db22698f2d52a014d6da4871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 2 Jan 2023 11:21:54 +0100 Subject: [PATCH] move to constructor --- .../entity-property/entity-property.element.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-property.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-property.element.ts index 475e3d596b..962476dea7 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-property.element.ts @@ -127,24 +127,16 @@ export class UmbEntityPropertyElement extends UmbControllerHostMixin(UmbObserver // TODO: make it easier to create a provider, unless a context should just extends a provider-controller? new UmbContextProviderController(this, 'umbPropertyContext', this._propertyContext); - } - - - connectedCallback(): void { - super.connectedCallback(); - this._observePropertyEditorUI(); - this.addEventListener('property-editor-change', this._onPropertyEditorChange as any as EventListener); - } - - private _observePropertyEditorUI() { this.observe(umbExtensionsRegistry.getByAlias(this.propertyEditorUIAlias), (manifest) => { if (manifest?.type === 'propertyEditorUI') { this._gotData(manifest); } }); + this.addEventListener('property-editor-change', this._onPropertyEditorChange as any as EventListener); } + private _gotData(propertyEditorUIManifest?: ManifestPropertyEditorUI) { if (!propertyEditorUIManifest) { // TODO: if dataTypeKey didn't exist in store, we should do some nice UI.