Open jeffersonveloso opened 2 years ago
I tried to use mat-select-filter with the options hasGroup and groupArrayName and not work for me. What is the problem with my code? On file .ts
test = [ { name: 'Category 1.0', child: [ { name: 'Category 1.1', }, ], }, { name: 'Category 2.0', child: [ { name: 'Category 2.1', }, ], }, ]; testFilterList = this.test.slice();
On file .html
<mat-form-field appearance="outline"> <mat-select #select required> <mat-select-filter *ngIf="select.focused" [array]="test" [displayMember]="'name'" (filteredReturn)="testFilterList = $event" [hasGroup]="true" [groupArrayName]="'child'" ></mat-select-filter> <mat-option *ngFor="let item of testFilterList" [value]="item"> {{ item.name }} </mat-option> </mat-select> </mat-form-field>
I tried to use mat-select-filter with the options hasGroup and groupArrayName and not work for me. What is the problem with my code? On file .ts
On file .html