mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-02 03:58:56 +01:00
change condition of lazy loading to be true if selectOption.children is undefined
This commit is contained in:
parent
ba84d20eb4
commit
4baa4becfe
@ -982,9 +982,15 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin
|
||||
if (!img) img = selectOption.icon ?? selectOption.im0 ?? selectOption.im1 ?? selectOption.im2;
|
||||
|
||||
// lazy iff "child" is set and "children" is empty or children does not exist in the first place
|
||||
const lazy = typeof selectOption.item !== "undefined" ?
|
||||
(selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item) :
|
||||
(selectOption.children?.length == 0 && selectOption.child);
|
||||
let lazy: Boolean | 1 | 0;
|
||||
if (typeof selectOption.item !== "undefined")
|
||||
{
|
||||
lazy = (selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item);
|
||||
} else
|
||||
{
|
||||
lazy = (typeof selectOption.children === "undefined" || selectOption.children?.length == 0)
|
||||
&& selectOption.child;
|
||||
}
|
||||
const value = selectOption.value ?? selectOption.id;
|
||||
if(expandState && this.autoloading && lazy)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user