[PM-7278] Fix undefined reference to `keyManager` within `menu-trigger-for` directive (#8614)
This commit is contained in:
parent
bf2f570b61
commit
e2e593c0fe
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue