Checkbox: Checkbox multiselect doesn't work with reactive form and formcontrol
Describe the bug
when implementing checkbox group selection with reactive forms and formcontrolname only the last element is saved in the value array while it should be all the selected items.
Environment
happening all the environments
Reproducer
https://stackblitz.com/edit/b2xqfx?file=src%2Fapp%2Fdemo%2Fcheckbox-dynamic-demo.html
Angular version
17.3.1
PrimeNG version
17.13.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
v18.18.0
Browser(s)
Microsoft Edge Version 123.0.2420.97 (Official build) (64-bit)
Steps to reproduce the behavior
use formcontrolname for multi-select checkbox group. attached stackblitz link
Expected behavior
formcontrol should have array of selected items instead of last selected item.
Hi, any updates here? this is a production-level bug-breaking application. can we have some updates here?
@PR4SAN
Hi, this issue is not present in the latest version of PrimeNG (17.17.0). Please try it with the latest version. I'm closing the issue.
This issue might be relevant to LTS versions too. For now we have to patch it with yarn. Take inspiration from this https://github.com/primefaces/primeng/commit/7ed5f1f3e417605bce5a8d16e79a016bd96c7ef2