use isNew in workspace view

This commit is contained in:
Jesper Møller Jensen
2023-12-13 13:02:44 +13:00
parent 2419a8c96c
commit 1d66d06199

View File

@@ -75,13 +75,15 @@ export class UmbRelationTypeWorkspaceViewRelationTypeElement extends UmbLitEleme
}
#renderParentProperty() {
if (this._relationType?.id) return html`<div slot="editor">${this._relationType.parentObjectTypeName}</div>`;
if (!this.#workspaceContext?.getIsNew() && this._relationType)
return html`<div slot="editor">${this._relationType.parentObjectTypeName}</div>`;
return html`<uui-select slot="editor"></uui-select>`;
}
#renderChildProperty() {
if (this._relationType?.id) return html`<div slot="editor">${this._relationType.parentObjectTypeName}</div>`;
if (!this.#workspaceContext?.getIsNew() && this._relationType)
return html`<div slot="editor">${this._relationType.parentObjectTypeName}</div>`;
return html`<uui-select slot="editor"></uui-select>`;
}