Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrasmussen committed Nov 2, 2024
1 parent 0694926 commit 62a2f5f
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
state,
repeat,
ifDefined,
property,
type PropertyValues,
} from '@umbraco-cms/backoffice/external/lit';
import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal';
Expand All @@ -28,9 +27,6 @@ export class UmbEntityCreateOptionActionListModalElement extends UmbModalBaseEle
@state()
private _apiControllers: Array<UmbExtensionApiInitializer<ManifestType>> = [];

@state()
_hrefMap = new Map<string, string>();

@state()
_hrefList: Array<any> = [];

Expand Down Expand Up @@ -65,12 +61,9 @@ export class UmbEntityCreateOptionActionListModalElement extends UmbModalBaseEle
);
}

async #onClick(event: Event, controller: UmbExtensionApiInitializer<ManifestType>) {
async #onClick(event: Event, controller: UmbExtensionApiInitializer<ManifestType>, href?: string) {
event.stopPropagation();

if (!controller.manifest) throw new Error('No manifest found');
const href = this._hrefMap.get(controller.manifest?.alias);

// skip if href is defined
if (href) {
return;
Expand Down Expand Up @@ -119,7 +112,7 @@ export class UmbEntityCreateOptionActionListModalElement extends UmbModalBaseEle
<uui-ref-node
name=${label}
detail=${ifDefined(manifest.meta.description)}
@click=${(event: Event) => this.#onClick(event, controller)}
@click=${(event: Event) => this.#onClick(event, controller, href)}
href=${ifDefined(href)}
target=${this.#getTarget(href)}
?selectable=${!href}
Expand Down

0 comments on commit 62a2f5f

Please sign in to comment.