mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
fixed lazy calculation in Tree
-- child == 1 and no item means lazy loading is needed
This commit is contained in:
parent
a8389d4286
commit
81a8432429
@ -661,7 +661,8 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
|
|||||||
|
|
||||||
// Check to see if node is marked as open with no children. If autoloadable, load the children
|
// Check to see if node is marked as open with no children. If autoloadable, load the children
|
||||||
const expandState = (this.calculateExpandState(selectOption));
|
const expandState = (this.calculateExpandState(selectOption));
|
||||||
const lazy = selectOption.item?.length === 0 && selectOption.child
|
// lazy iff "child" is set and "item" is empty or item does not exist in the first place
|
||||||
|
const lazy = (selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item)
|
||||||
if(expandState && this.autoloading && lazy)
|
if(expandState && this.autoloading && lazy)
|
||||||
{
|
{
|
||||||
this.updateComplete.then(() =>
|
this.updateComplete.then(() =>
|
||||||
|
Loading…
Reference in New Issue
Block a user