This commit is contained in:
Niels Lyngsø
2025-11-19 09:55:59 +01:00
parent e46e65ef22
commit e2a8bea579
3 changed files with 3 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ export class UmbEntityActionsBundleElement extends UmbLitElement {
@state()
private _firstActionHref?: string;
// TODO: provide the entity context on a higher level, like the root element of this entity, tree-item/workspace/... [NL]
// TODO: Ideally this is provided on a higher level, as in the Tree-item, Workspace, Collection-Row, etc [NL]
#entityContext = new UmbEntityContext(this);
#inViewport = false;
#observingEntityActions = false;

View File

@@ -45,6 +45,7 @@ export class UmbEntityActionListElement extends UmbLitElement {
[UmbEntityActionArgs<MetaEntityAction>]
>;
// TODO: Ideally this is provided on a higher level, as in the Tree-item, Workspace, Collection-Row, etc [NL]
#entityContext = new UmbEntityContext(this);
#generateApiArgs() {

View File

@@ -254,6 +254,7 @@ export abstract class UmbTreeItemContextBase<
}
async #consumeContexts() {
// TODO: Stop consuming the section context, instead lets get the needed data from the tree context. [NL]
this.consumeContext(UMB_SECTION_CONTEXT, (instance) => {
this.#sectionContext = instance;
this.#observeSectionPath();