Autocomplete does not convert to objects unless you select the option #17446
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
When using the autocomplete component with objects, you can end up the case of having a valid input, but the control value not being an object.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/knhvzmty?file=src%2Fapp%2Fautocomplete-objects-demo.html
Environment
macOS 14.6.1 (23G93)
Angular version
19.0.7
PrimeNG version
v19
Node version
22
Browser(s)
Chrome 131.0.6778.265 (Official Build) (arm64); Firefox 134.0 (aarch64)
Steps to reproduce the behavior
United Kingdom
, the control value displayed is{ "name": "United Kingdom", "code": "GB" }
which is the expected result"United Kingdom"
and remains so even if on blur is triggeredExpected behavior
I would have expected the input to be transformed into an object whenever possible, not only on select
The text was updated successfully, but these errors were encountered: