Skip to content

Commit

Permalink
[PM-7278] Fix undefined reference to keyManager within `menu-trigge…
Browse files Browse the repository at this point in the history
…r-for` directive (#8614)
  • Loading branch information
cagonzalezcs committed Apr 4, 2024
1 parent bf2f570 commit e2e593c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/components/src/menu/menu-trigger-for.directive.ts
Expand Up @@ -88,12 +88,12 @@ export class MenuTriggerForDirective implements OnDestroy {
}
this.destroyMenu();
});
this.menu.keyManager.setFirstItemActive();
this.keyDownEventsSub =
this.menu.keyManager &&
this.overlayRef
if (this.menu.keyManager) {
this.menu.keyManager.setFirstItemActive();
this.keyDownEventsSub = this.overlayRef
.keydownEvents()
.subscribe((event: KeyboardEvent) => this.menu.keyManager.onKeydown(event));
}
}

private destroyMenu() {
Expand Down

0 comments on commit e2e593c

Please sign in to comment.