simpler workspace needs

This commit is contained in:
Niels Lyngsø
2022-12-20 15:10:28 +01:00
parent 557461186c
commit 17f5595ef8

View File

@@ -31,19 +31,6 @@ export class UmbWorkspaceMediaElement extends UmbContextConsumerMixin(UmbContext
this._provideWorkspace();
}
private _entityType = '';
@property()
public get entityType(): string {
return this._entityType;
}
public set entityType(value: string) {
// TODO: Make sure that a change of the entity type actually gives extension slot a hint to change/update.
const oldValue = this._entityType;
this._entityType = value;
this._provideWorkspace();
this.requestUpdate('entityType', oldValue);
}
private _workspaceContext?:UmbWorkspaceMediaContext;
@@ -66,7 +53,7 @@ export class UmbWorkspaceMediaElement extends UmbContextConsumerMixin(UmbContext
}
protected _provideWorkspace() {
if(this._entityType && this._entityKey) {
if(this._entityKey) {
this._workspaceContext = new UmbWorkspaceMediaContext(this, this._entityKey);
this.provideContext('umbWorkspaceContext', this._workspaceContext);
}