diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/views/edit/workspace-view-content-edit.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/views/edit/workspace-view-content-edit.element.ts index c45c5074b1..06f5900457 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/views/edit/workspace-view-content-edit.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/views/edit/workspace-view-content-edit.element.ts @@ -40,11 +40,22 @@ export class UmbWorkspaceViewContentEditElement extends UmbLitElement { private _observeContent() { if (!this._workspaceContext) return; + /* + TODO: Property-Context: This observer gets all changes, We need to fix this. it should be simpler. + It should look at length and aliases? as long as they are identical nothing should change. + As they would update them selfs? + + Should use a Observable for this._workspaceContext.properties + */ this.observe( this._workspaceContext.data.pipe(distinctUntilChanged()), (content) => { this._properties = content.properties; this._data = content.data; + /* + Maybe we should not give the value, but the umb-content-property should get the context and observe its own data. + This would become a more specific Observer therefor better performance?.. Note to self: Debate with Mads how he sees this perspective. + */ } ); } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts index 4bbbb6245b..3ab1531a50 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts @@ -41,6 +41,9 @@ export class UmbWorkspaceContentContext< ) { this._host = host; + + //TODO: Use the UniqueBehaviorSubject, and separate observables for each part? + this._data = new BehaviorSubject(defaultData); this.data = this._data.asObservable(); this.entityType = entityType;