Component: p-multiSelect don´t work when using in reactive forms #14976
Labels
Resolution: Stale
Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Describe the bug
When applying the formControlName attribute to the p-multiSelect component instead using the ngModel, the component throws an error:
It seems it can´t bind it´s options properly anymore.
Everything working fine, when using ngModel.
Environment
Angular 17
PrimeNG 17.7.0
Reproducer
No response
Angular version
17.0.1
PrimeNG version
17.7.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.11.0
Browser(s)
Chrome (122.0.6261.69)
Steps to reproduce the behavior
Implement p-multiSelect inside form tag
Use formControlName on component
Pass options array of object (e.g.: {label: 'Test', value: 'test'})
Go to frontend
MutliSelect already display wrong item, when pre setting a value
Open the Multiselect inside frontend -> Error appears; loading of options is aborted
Expected behavior
MultiSelect display´s selected value correctly and load it´s options, when using inside reactive forms -> using formControlName attribute.
The text was updated successfully, but these errors were encountered: