I succeeded in making the menu appear on mouseenter
. What I want to do now is make it disappear on the mouseleave
event of the menu itself. Any ideas on how to make this possible?
<button mat-button [mat-menu-trigger-for]="menu"
#menuTrigger="matMenuTrigger" (mouseenter)="menuTrigger.openMenu()">
TRIGGER BUTTON
</button>
<mat-menu #menu="matMenu" [overlapTrigger]="false"
(mouseleave)="menuTrigger.closeMenu()">
<button mat-menu-item [routerLink]="['sources']">
<mat-icon>view_headline</mat-icon>
MENU CHOICE
</button>
</mat-menu>
this.menuTrigger.closeMenu()
, and call that function instead. – Leix