mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:36 +01:00
Et2Tree: Avoid some errors on first leaf selection
This commit is contained in:
parent
27418ec0f4
commit
5f26b940e3
@ -625,9 +625,9 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
|
||||
.selection=${this.multiple ? "multiple" : "single"}
|
||||
@sl-selection-change=${
|
||||
(event: any) => {
|
||||
this._previousOption = this._currentOption || this.getNode(this.value);
|
||||
this._previousOption = this._currentOption ?? (this.value.length ? this.getNode(this.value) : null);
|
||||
this._currentOption = this.getNode(event.detail.selection[0].id);
|
||||
event.detail.previous = this._previousOption.id;
|
||||
event.detail.previous = this._previousOption?.id;
|
||||
this._currentSlTreeItem = event.detail.selection[0];
|
||||
if(typeof this.onclick == "function")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user