mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
click on tree-item now triggers the onclick event --- previous it was only triggered on change of folder
This commit is contained in:
parent
8658e46676
commit
3cc5d910b8
@ -151,7 +151,6 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
|
|||||||
|
|
||||||
// Actions can't be initialized without being connected to InstanceManager
|
// Actions can't be initialized without being connected to InstanceManager
|
||||||
this._initActions();
|
this._initActions();
|
||||||
//TODO do it on first updated
|
|
||||||
this._link_actions(this.actions)
|
this._link_actions(this.actions)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,6 +162,11 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
|
|||||||
//Sl-Trees handle their own onClick events
|
//Sl-Trees handle their own onClick events
|
||||||
_handleClick(_ev)
|
_handleClick(_ev)
|
||||||
{
|
{
|
||||||
|
//if onclick is defined, and we have a resonable target (e.g. one single item that was clicked on, trigger the onclick function
|
||||||
|
if (typeof this.onclick == "function" && typeof _ev.target.value == "string")
|
||||||
|
{
|
||||||
|
this.onclick(_ev.target.value, this, _ev.target.value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles()
|
static get styles()
|
||||||
|
Loading…
Reference in New Issue
Block a user