From a6a416022d221da4daf06be5c17e463e952dd52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 23 May 2024 14:15:33 +0200 Subject: [PATCH] reset to values to default when switching property editor --- .../data-type/workspace/data-type-workspace.context.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/workspace/data-type-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/workspace/data-type-workspace.context.ts index bcd771eea2..3cbb0dea49 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/workspace/data-type-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/workspace/data-type-workspace.context.ts @@ -144,7 +144,8 @@ export class UmbDataTypeWorkspaceContext await this.#observePropertyEditorSchemaAlias(); } - if (this.getIsNew()) { + const oldPropertyEditorUIAlias = this.#persistedData.getValue()?.editorUiAlias; + if (this.getIsNew() || oldPropertyEditorUIAlias !== propertyEditorUiAlias) { this.#transferConfigDefaultData(); } this._mergeConfigProperties();