I have a mat-select component that contains custom options (with additional menu "Set as default"):
<mat-form-field appearance="fill">
<mat-label>Favorite food</mat-label>
<mat-select>
<mat-option *ngFor="let food of foods" [value]="food.value">
{{food.viewValue}}
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item>
<span>Set as default</span>
</button>
</mat-menu>
</mat-option>
</mat-select>
</mat-form-field>
However, when I open the menu, select option list disappears and I can see only "Set as default" pop-up.
Can we show "Set as default" on top of the select option list somehow or it is impossible in Angular Material?
This is a link to Stackblitz with the code: https://stackblitz.com/edit/angular-material-playground-hcw1wo?file=src/app/app.component.html