Skip to content

Commit

Permalink
Merge branch 'next' of https://github.com/shoelace-style/shoelace int…
Browse files Browse the repository at this point in the history
…o next
  • Loading branch information
claviska committed Nov 23, 2022
2 parents 0b7eae0 + f3e2737 commit bdf890a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/tree-item/tree-item.ts
Expand Up @@ -96,7 +96,7 @@ export default class SlTreeItem extends ShoelaceElement {
this.childrenContainer.hidden = !this.expanded;
this.childrenContainer.style.height = this.expanded ? 'auto' : '0';

this.isLeaf = this.getChildrenItems().length === 0;
this.isLeaf = !this.lazy && this.getChildrenItems().length === 0;
this.handleExpandedChange();
}

Expand Down Expand Up @@ -202,7 +202,7 @@ export default class SlTreeItem extends ShoelaceElement {

handleChildrenSlotChange() {
this.loading = false;
this.isLeaf = this.getChildrenItems().length === 0;
this.isLeaf = !this.lazy && this.getChildrenItems().length === 0;
}

protected willUpdate(changedProperties: PropertyValueMap<SlTreeItem> | Map<PropertyKey, unknown>): void {
Expand Down

0 comments on commit bdf890a

Please sign in to comment.