Primeng: Radio Buttons in a Form Array affect all Radio Buttons in the Array

Created on 6 Jan 2021  路  5Comments  路  Source: primefaces/primeng

I'm submitting a ... (check one with "x")

[x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
Selecting a radio button in one group of a Form Array causes all other radio buttons in other groups to change their value selections. As this is a Form Array all the formControlName values for the radio buttons are the same.

Expected behavior
When selecting a radio button in one group in a Form Array it should have no impact on the radio buttons in another group.

Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/primeng-radio-form-array-selection-issue

What is the motivation / use case for changing the behavior?
I should be able to dynamically render questions in a Form Array with radio buttons. This was working for Angular 10 but is not in Angular 11.

Please tell us about your environment:
Windows 10
Angular 10
PrimeNG 11
VS Code
.NET 3.1

  • Browser: all

  • Language: TypeScript 4.0.5 | ES6/7

  • Node (for AoT issues): node --version = v12.19.0

pending-review

Most helpful comment

+1 here, it's unusable inside Form Arrays, please fix

All 5 comments

I have the same problem 鈽濓笍. Does someone know solve this? Please, It's urgent

@AlbaSS18 I have not found one, other than don't upgrade to PrimeNG 11. Given that the formControlName and the name properties have to match in PrimeNG 11, which is how we have it implemented in PrimeNG 10, you can't change the name to be indexed.

+1 here, it's unusable inside Form Arrays, please fix

Is there any news on the resolution of this bug? The component is absolutely unusable....

Or when it's planned to solve it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Helayxa picture Helayxa  路  3Comments

pchristou picture pchristou  路  3Comments

jisqaqov picture jisqaqov  路  3Comments

Helayxa picture Helayxa  路  3Comments

watalberto picture watalberto  路  3Comments