Currently, I have implemented the selectTo dropdown feature in angular material design.
Here is the code snippet that I am using:
<mat-form-field id="inputClick" appearance="outline" (click)="Valid()">
<mat-label>{{'GENERAL.TITLE' | translate}} *</mat-label>
<mat-select [formControl]="toppings" multiple>
<div class="drpInput">
<mat-form-field class="mat-form-field-fluid" appearance="outline">
<mat-label>{{'GENERAL.TITLE' | translate}} *</mat-label>
<input autocomplete="off" matInput [placeholder]="'GENERAL.TITLE' | translate"
(keyup)="onTextChange($event.target.value)">
</mat-form-field>
</div>
<div class="oprionSelect">
<mat-option (click)="selectedUser(item.id)" *ngFor="let item of users" [value]="item.id">
<label>{{ item.displayName | translate }} </label><span class="mar">({{item.userName}})</span>
</mat-option>
</div>
<mat-progress-bar *ngIf="loading" mode="indeterminate"></mat-progress-bar>
<div class="row justofy-content-center text-center m-auto col-md-12 col-sm-12 col-lg-12 col-xl-12 col-lg12">
<div class="col-md-4 col-sm-4 col-lg-4 col-xl-4 col-lg-4 right">
<button mat-button color="primary" (click)="next()" *ngIf="nextBtn">Next</button>
</div>
<div class="col-md-4 col-sm-4 col-lg-4 col-xl-4 col-lg-4" *ngIf="count!=0">
<button mat-button (click)="close()" color="warn">Select</button>
</div>
<div class="col-md-4 col-sm-4 col-lg-4 col-xl-4 col-lg-4 left">
<button mat-button color="accent" (click)="prev()" *ngIf="prevBtn">Previous</button>
</div>
</div>
</mat-select>
After clicking the 'finish' button, my goal is to automatically close the dropdown menu. How can I accomplish this functionality?