From b080f70b49f41640afdf2bd37b2fa5ca771bcb93 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 8 Dec 2023 15:35:36 +0100 Subject: [PATCH] use update --- .../workspace/partial-view-workspace.context.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts index 7ea5a2601b..92dda5d92c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts @@ -1,7 +1,7 @@ import { UmbPartialViewRepository } from '../repository/partial-view.repository.js'; import type { UmbPartialViewDetailModel } from '../types.js'; import { UMB_PARTIAL_VIEW_ENTITY_TYPE } from '../entity.js'; -import { UmbBooleanState, UmbDeepState } from '@umbraco-cms/backoffice/observable-api'; +import { UmbBooleanState, UmbObjectState } from '@umbraco-cms/backoffice/observable-api'; import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api'; import { UmbSaveableWorkspaceContextInterface, @@ -46,7 +46,7 @@ export class UmbPartialViewWorkspaceContext return Promise.resolve(); } - #data = new UmbDeepState(undefined); + #data = new UmbObjectState(undefined); readonly data = this.#data.asObservable(); readonly name = this.#data.asObservablePart((data) => data?.name); readonly content = this.#data.asObservablePart((data) => data?.content); @@ -74,11 +74,11 @@ export class UmbPartialViewWorkspaceContext } setName(value: string) { - this.#data.next({ ...this.#data.value, name: value }); + this.#data.update({ name: value }); } setContent(value: string) { - this.#data.next({ ...this.#data.value, content: value }); + this.#data.update({ content: value }); } async load(entityKey: string) {