block corrections

This commit is contained in:
Niels Lyngsø
2024-03-13 16:22:50 +01:00
parent d896d1a8e7
commit 30133ca766
2 changed files with 5 additions and 11 deletions

View File

@@ -45,14 +45,11 @@ export class UmbBlockWorkspaceViewEditTabElement extends UmbLitElement {
this.#groupStructureHelper.setIsRoot(value);
}
private _ownerTabId?: string | null;
@property({ type: String })
public get ownerTabId(): string | null | undefined {
return this._ownerTabId;
public get containerId(): string | null | undefined {
return this.#groupStructureHelper.getParentId();
}
public set ownerTabId(value: string | null | undefined) {
if (value === this._ownerTabId) return;
this._ownerTabId = value;
public set containerId(value: string | null | undefined) {
this.#groupStructureHelper.setParentId(value);
}
@@ -72,8 +69,6 @@ export class UmbBlockWorkspaceViewEditTabElement extends UmbLitElement {
constructor() {
super();
this.#groupStructureHelper.setParentType('Tab');
this.consumeContext(UMB_BLOCK_WORKSPACE_CONTEXT, (workspaceContext) => {
this.#blockWorkspace = workspaceContext;
this.#setStructureManager();

View File

@@ -98,8 +98,7 @@ export class UmbBlockWorkspaceViewEditElement extends UmbLitElement implements U
(component as UmbBlockWorkspaceViewEditTabElement).tabName = tabName;
// TODO: Consider if we can link these more simple, and not parse this on.
// Instead have the structure manager looking at wether one of the OwnerALikecontainers is in the owner document.
(component as UmbBlockWorkspaceViewEditTabElement).ownerTabId =
this.#tabsStructureHelper.isOwnerChildContainer(tab.id!) ? tab.id : undefined;
(component as UmbBlockWorkspaceViewEditTabElement).containerId = tab.id;
},
});
});
@@ -112,7 +111,7 @@ export class UmbBlockWorkspaceViewEditElement extends UmbLitElement implements U
setup: (component) => {
(component as UmbBlockWorkspaceViewEditTabElement).managerName = this.#managerName;
(component as UmbBlockWorkspaceViewEditTabElement).noTabName = true;
(component as UmbBlockWorkspaceViewEditTabElement).ownerTabId = null;
(component as UmbBlockWorkspaceViewEditTabElement).containerId = null;
},
});
}