1

I am using mat-select in my angular app. My Code is as follows:

<mat-form-field appearance="fill">
  <mat-label>Select an option</mat-label>
  <mat-select [(value)]="selected">
    <mat-option>None</mat-option>
    <mat-option value="option1">Option 1</mat-option>
    <mat-option value="option2">Option 2</mat-option>
    <mat-option value="option3">Option 3</mat-option>
  </mat-select>
</mat-form-field>

<p>You selected: {{selected}}</p>

stackblitz:

https://stackblitz.com/run?file=src%2Fapp%2Fselect-value-binding-example.html

I want to implement search in this dropdown. How can I do that?

1 Answers1

2

Maybe this library https://www.npmjs.com/package/ngx-mat-select-search fits your needs. If it's not good for you, check the source code and you can take an example from there.

K. Roland
  • 96
  • 2