bug(mat-autocomplete): Dropdown Option <mat-option>
Not Visually Selected After Setting Value with patchValue
in mat-autocomplete
#30154
Labels
needs triage
This issue needs to be triaged by the team
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Steps to Reproduce:
getProducts
method sets the value of theproductCtrl
control programmatically usingpatchValue
.Code Snippet:
Reproduction
StackBlitz link: mat-autocomplete with mat-stepper
Expected Behavior
The
<mat-option>
corresponding to the value set bypatchValue
should visually appear as selected in the autocomplete dropdown when the component is loaded.Actual Behavior
When setting the value of the product form control via
patchValue
inside thegetProducts
method, the form control updates its value correctly. However, the corresponding<mat-option>
in the autocomplete dropdown does not visually show as selected on the initial load of the component.Environment
18.2.9
18.2.10
The text was updated successfully, but these errors were encountered: