I am using reactive form and my form field loks like below.
<mat-form-field>
<mat-select placeholder="Select District" formControlName="district" required>
<mat-option
*ngFor="let district of districts"
[value]="district.districtID" >
{{ district.districtID}} - {{ district.districtName}}
</mat-option>
</mat-select>
</mat-form-field>
I am updating district field value using patchValue in activatedRoute
this.activatedRoute.queryParams.subscribe(
params => {
this.myForm.controls['district'].setValue(params['district']);
})
the problem is it is setting the value to district formcontrol,but the mat-select is still showing placeholder.