Et2LinkList: Do not create context menu until needed

This commit is contained in:
nathan 2024-09-17 08:50:05 -06:00
parent 5efbf26267
commit 6e7a01dde9

View File

@ -115,6 +115,8 @@ export class Et2LinkList extends Et2LinkString
readonly: {type: Boolean}
}
}
private context : egwMenu;
constructor()
{
@ -130,7 +132,6 @@ export class Et2LinkList extends Et2LinkString
connectedCallback()
{
super.connectedCallback();
this._createContextMenu();
// Look for LinkTo and listen for change so we can update
if(this.getInstanceManager())
@ -527,6 +528,11 @@ export class Et2LinkList extends Et2LinkString
{
return;
}
if(!this.context)
{
this._createContextMenu();
}
// Find the link
let link = this.querySelector("et2-link[slot='" + _ev.currentTarget.id + "']");