-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Description
Bug
Switching between submenus doesn't pass the [matMenuTriggerData] properly.
It passes only to the first selected submenu, but the data is empty when selecting other submenus after the first.
What are the steps to reproduce?
Sample code: https://stackblitz.com/edit/angular-nevxe3?file=app%2Fnested-menu-example.html
<button mat-button [matMenuTriggerFor]="animals">Animal index</button>
<mat-menu #animals="matMenu">
<button mat-menu-item [matMenuTriggerFor]="submenu" [matMenuTriggerData]="{category: 'vertebrates'}">Vertebrates</button>
<button mat-menu-item [matMenuTriggerFor]="submenu" [matMenuTriggerData]="{category: 'invertebrates'}">Invertebrates</button>
</mat-menu>
<mat-menu #submenu="matMenu">
<ng-template matMenuContent let-category="category">
<button mat-menu-item>You selected: {{category}}</button>
</ng-template>
</mat-menu>
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.1.0
Material 6.4.2
ravinsinghd
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent