I want to implement mat-select-filter in mat-select module. I have added a search icon for searching the items in the dropdown based on characters entered. I have referred this mat-select-filter and stackblitz but I was not getting the filter field.Below is the code that I've used
search-filter.component.html
<mat-form-field class="input-permissions">
<mat-select
placeholder="Permissions"
multiple
[formControl]="permissionsControl"
>
<mat-select-filter
[array]="permissions"
(filteredreturn)="filteredList=$event"
></mat-select-filter>
<mat-option
*ngFor="let permission of permissions"
[value]="permission.value"
>
{{ permission.value}}
</mat-option>
</mat-select>
</mat-form-field>
mat-select-filter.component.ts
export class MatSelectFilterComponent{
permissions: {{id: 0, value: fruit},{id: 1, value: vegetable} };
public filteredList = this.permissions.slice();
}
Any help would be appreciated.
(filteredreturn="filteredList=$event" ). It should be(filteredreturn)="filteredList=$event"