How to set default select values from drop down for multiple fields using mat-select-autocomplete

109 Views Asked by At

I'm using a custom plugin to display the custom form, which will show several dynamic multiple drop-down fields. However, I'm having trouble with the default value not being selected from the drop-down menu.

<mat-select-autocomplete
                    [placeholder]="'Options Selection'"
                    [options]="filter.items"
                    [display]="'label'"
                    [value]="'value'"
                    [multiple]='true'
                    [labelCount]="2"
                    [selectedOptions]="selectedValuesMap.get(filter)"
                    (selectionChange)="getSelectedOptions($event, filter)">

I tried using [formControl] and [(ngModel)] attributes but not working. I want to set the default value from the drop down for all the different field drop downs

0

There are 0 best solutions below