components
components copied to clipboard
bug(MatAutocomplete): setValue on FormControl does not update AutoComplete Input
Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When using a custom input field with a FormControl, I am unable to dynamically set the value of the input element via setValue()
.
https://stackblitz.com/edit/vavcrk
Reproduction
https://stackblitz.com/edit/vavcrk
Expected Behavior
Using setValue()
on the FormControl should update the value of the input element.
Actual Behavior
Input element value continues to be empty
Environment
- Angular: 17
- CDK/Material: 16
- Browser(s): Chome
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS
Just to clarify I want to update the query string that goes into the matInput field dynamically in code.