Filter expanded nodes by id

Co-Authored-By: Art Lowel <1567693+artlowel@users.noreply.github.com>
This commit is contained in:
William Welling
2023-11-09 11:24:31 -06:00
parent 11d3771e72
commit dc2ef989e6

View File

@@ -84,7 +84,7 @@ export class CommunityListComponent implements OnInit, OnDestroy {
toggleExpanded(node: FlatNode) {
this.loadingNode = node;
if (node.isExpanded) {
this.expandedNodes = this.expandedNodes.filter((node2) => node2.name !== node.name);
this.expandedNodes = this.expandedNodes.filter((node2) => node2.id !== node.id);
node.isExpanded = false;
} else {
this.expandedNodes.push(node);