mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-04 13:10:33 +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;
|
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
|
// lazy iff "child" is set and "children" is empty or children does not exist in the first place
|
||||||
const lazy = typeof selectOption.item !== "undefined" ?
|
let lazy: Boolean | 1 | 0;
|
||||||
(selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item) :
|
if (typeof selectOption.item !== "undefined")
|
||||||
(selectOption.children?.length == 0 && selectOption.child);
|
{
|
||||||
|
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;
|
const value = selectOption.value ?? selectOption.id;
|
||||||
if(expandState && this.autoloading && lazy)
|
if(expandState && this.autoloading && lazy)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user