feat(aio): expand nav menu branch of select item on page load
This commit is contained in:
parent
64beae9527
commit
a13ddf2e8a
|
@ -17,6 +17,7 @@ export class NavItemComponent implements OnChanges {
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (changes['selectedNodes'] || changes['node']) {
|
if (changes['selectedNodes'] || changes['node']) {
|
||||||
this.isSelected = this.selectedNodes.indexOf(this.node) !== -1;
|
this.isSelected = this.selectedNodes.indexOf(this.node) !== -1;
|
||||||
|
this.isExpanded = this.isExpanded || this.isSelected;
|
||||||
}
|
}
|
||||||
this.setClasses();
|
this.setClasses();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue