<button mat-button id="categories-button" [mat-menu-trigger-for]="categoryList">
<span>categories</span>
<mat-icon id="drop-arrow">arrow_drop_down</mat-icon>
</button>
<mat-menu #categoryList>
<mat-form-field appearance="standard" id="category-search-wrapper">
<input (click)="$event.stopPropagation()" matInput id="category-search">
</mat-form-field>
<button mat-menu-item>Settings</button>
<button mat-menu-item>Help</button>
</mat-menu>
I want category-search
input to be focused, when Menu is opened, the problem is it doesn't seem to be ready yet, when menuOpened event is emitted. How can I focus input element when Menu is opened?