Et2Tree: Fix first node was always opened

Now respecting what's sent in data
This commit is contained in:
nathan 2024-02-28 08:59:11 -07:00
parent e228355809
commit 6eba414ce8

View File

@ -822,22 +822,12 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
{ {
return true return true
} }
if(this._selectOptions.length > 1 && // TODO: Move this mail-specific stuff into mail
this._selectOptions[0] == selectOption &&
(this._selectOptions.find((selectOption) => {
return selectOption.open
}) == undefined
)
)
{
return true //open the first item, if no item is opened
}
if(selectOption.id && (selectOption.id.endsWith("INBOX") || selectOption.id == window.egw.preference("ActiveProfileID", "mail"))) if(selectOption.id && (selectOption.id.endsWith("INBOX") || selectOption.id == window.egw.preference("ActiveProfileID", "mail")))
{ {
return true return true
} }
return false return false;
;
} }
private _deleteItem(_id, list) private _deleteItem(_id, list)