-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Radio buttons do not get unselected on the same group, with Reactive Forms using formControl instead of formControlName #9631
Comments
…with formControl
@yigitfindikli could you please check this PR: #9632 for this issue? Thanks. We are using PrimeNG in several frontend applications exclusively with reactive form. IMHO this fix is urgent for core PrimeNG users to make p-radiobutton available for complex usage with reactive form |
@yigitfindikli @cagataycivici Could you please check & merge related MR of this issue? This bug make us cannot upgrade Primeng to v10+ 😢 |
Please someone consider it ! |
+1 |
1 similar comment
+1 |
this issue caused the radio button to not work properly with ngx-formly 😞 |
* Upgrade to Angular 10.2 * primeng style fixes * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng autocomplete * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * upgrade to Angular 11 * add import statement * Angular 11 upgrade - style fixes and Auto-complete API changes * Angular 11 upgrade - style fixes * Angular 11 upgrade - radio box in reactive form fix for issue primefaces/primeng#9631 * Angular 11 upgrade - style fix * Angular 11 upgrade - style fixs * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 fixes after master merge * update kaltura-ng libs * update clientlib * typo fix * fix(live stream): change universal live call to use new RxJS syntax (#945) * fix(entries/categories): endless load of Entitlements tab (use new RxJS syntax) (#946) * fix(playlists/details): switch to next/previous playlist (left/right arrows) (#949) * fix(settings/transcoding): table has wrong width on IE11 (#950) * typo fix * fix(entries/edit/flavors/): Match from Drop Folder error due to old RxJS syntax (use new RxJS syntax) (#947) * fix(categories): After selecting another Category all of them disappear on Move Category (#952) * fix(entry): IE-11 - Back arrow cut-off in all relevant pages KMCNG-2340 (#948) * fix(entries/edit): IE-11 - Back arrow cut-off in all relevant pages * fix(entry): back button is cut-off in IE11 * fix(entries/distribution): refresh button is cut off KMCNG-2320 (#951) * fix(entries/distribution): refresh button is cut off * fix(entry/distribution): IE11 - refresh button is cut off * fix: angular.json * fix(theme): change controls color to primary, change analytics logo, change header gradient KMCNG-2370 (#953) * fix(theme): change controls color to primary, change analytics logo, change header gradient * fix: link colors, logo for dpi 1 * fix(theme): style and RxJS fixes for Angular 11 (#954) * fix(settings/integration): fix zoom form radio controls * chore: update kaltura libraries * fix(playlists/rule based playlist): fix RxJS old syntax issues (#956) * fix(login/expired password): add validation for new password to be different than old KMCNG-2377 (#958) * fix(login/expired password): add validation for new password to be different than old * fix: show new password equality error message at the bottom * fix(upload/manual-live): add support for DASH stream KMCNG-2376 (#957) * fix(upload/manual-live): add support for DASH stream * fix: add DASH to error message * fix(settings/integration): zoom - copy code without break lines (#961) * fix(entry/captions): add delete menu option to broken caption KMCNG-2381 (#960) * fix(entry/captions): add delete menu option to broken caption * fix: move actions filtering logic Co-authored-by: Viktor Kyryltsev <[email protected]>
* Upgrade to Angular 10.2 * primeng style fixes * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng autocomplete * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * upgrade to Angular 11 * add import statement * Angular 11 upgrade - style fixes and Auto-complete API changes * Angular 11 upgrade - style fixes * Angular 11 upgrade - radio box in reactive form fix for issue primefaces/primeng#9631 * Angular 11 upgrade - style fix * Angular 11 upgrade - style fixs * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 fixes after master merge * update kaltura-ng libs * update clientlib * typo fix * fix(live stream): change universal live call to use new RxJS syntax (#945) * fix(entries/categories): endless load of Entitlements tab (use new RxJS syntax) (#946) * fix(playlists/details): switch to next/previous playlist (left/right arrows) (#949) * fix(settings/transcoding): table has wrong width on IE11 (#950) * typo fix * fix(entries/edit/flavors/): Match from Drop Folder error due to old RxJS syntax (use new RxJS syntax) (#947) * fix(categories): After selecting another Category all of them disappear on Move Category (#952) * fix(entry): IE-11 - Back arrow cut-off in all relevant pages KMCNG-2340 (#948) * fix(entries/edit): IE-11 - Back arrow cut-off in all relevant pages * fix(entry): back button is cut-off in IE11 * fix(entries/distribution): refresh button is cut off KMCNG-2320 (#951) * fix(entries/distribution): refresh button is cut off * fix(entry/distribution): IE11 - refresh button is cut off * fix: angular.json * fix(theme): change controls color to primary, change analytics logo, change header gradient KMCNG-2370 (#953) * fix(theme): change controls color to primary, change analytics logo, change header gradient * fix: link colors, logo for dpi 1 * fix(theme): style and RxJS fixes for Angular 11 (#954) * fix(header): change "create" button, add credentials avatar * fix: add checking to appUser * fix: user dropdown position, long user name * fix layout * load partner status Co-authored-by: amirch1 <[email protected]>
* fix(header): change "create" button, add credentials avatar (#955) * Upgrade to Angular 10.2 * primeng style fixes * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng autocomplete * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * update primeng styles * upgrade to Angular 11 * add import statement * Angular 11 upgrade - style fixes and Auto-complete API changes * Angular 11 upgrade - style fixes * Angular 11 upgrade - radio box in reactive form fix for issue primefaces/primeng#9631 * Angular 11 upgrade - style fix * Angular 11 upgrade - style fixs * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 RxJs fixes * Angular 11 fixes after master merge * update kaltura-ng libs * update clientlib * typo fix * fix(live stream): change universal live call to use new RxJS syntax (#945) * fix(entries/categories): endless load of Entitlements tab (use new RxJS syntax) (#946) * fix(playlists/details): switch to next/previous playlist (left/right arrows) (#949) * fix(settings/transcoding): table has wrong width on IE11 (#950) * typo fix * fix(entries/edit/flavors/): Match from Drop Folder error due to old RxJS syntax (use new RxJS syntax) (#947) * fix(categories): After selecting another Category all of them disappear on Move Category (#952) * fix(entry): IE-11 - Back arrow cut-off in all relevant pages KMCNG-2340 (#948) * fix(entries/edit): IE-11 - Back arrow cut-off in all relevant pages * fix(entry): back button is cut-off in IE11 * fix(entries/distribution): refresh button is cut off KMCNG-2320 (#951) * fix(entries/distribution): refresh button is cut off * fix(entry/distribution): IE11 - refresh button is cut off * fix: angular.json * fix(theme): change controls color to primary, change analytics logo, change header gradient KMCNG-2370 (#953) * fix(theme): change controls color to primary, change analytics logo, change header gradient * fix: link colors, logo for dpi 1 * fix(theme): style and RxJS fixes for Angular 11 (#954) * fix(header): change "create" button, add credentials avatar * fix: add checking to appUser * fix: user dropdown position, long user name * fix layout * load partner status Co-authored-by: amirch1 <[email protected]> * add free trial "start plan" button in header * add notifications bar * add introduction video placeholder to the "what's new" window * display notifications bar only for self serve users * add self serve options to user settings menu * add KPF connectivity * update route for KPF * update routes * update server-config-example.json * fix usage dashboard permissions * fix usage dashboard permissions * fix usage dashboard permissions Co-authored-by: Viktor Kyryltsev <[email protected]>
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-f2wj15-yqzqu3?file=src/app/app.component.html
Current behavior
When using p-radiobutton element with ReactiveFroms, once a radio button gets selected, it never gets unselected. However the form value updates properly.
Expected behavior
Only the current value should be selected on screen
Minimal reproduction of the problem with instructions
Just create a reactive form, with a form control, and a group of radiobuttons. This is a minimal reproduction of the problem:
https://stackblitz.com/edit/github-f2wj15-yqzqu3?file=src/app/app.component.html
and fix in #9265 (with b823983) only work for formControlName is same with name: https://stackblitz.com/edit/github-f2wj15-vde3mw?file=src%2Fapp%2Fapp.component.html
What is the motivation / use case for changing the behavior?
As the original issue is closed without proper fix, I re-report the issue
(related: #9440 , #9162)
The fix in #9265 (with b823983) is quite limited to the case using formControlName. If formControl is used instead of formControlName, the fix will just not work.
It seems the purpose of b823983 to add
if (this.formControlName)
condition inngOnInit /ngOnDestroy/select
is trying to not using registry for template-driven forms; but in that case should also takeformControl
under consideration.Probably
if (this.formControlName)
condition inngOnInit /ngOnDestroy/select
should change toif (this.formControlName || this.fromControl)
with@Input() formControl: AbstractControl;
.
Angular version: 10.X
PrimeNG version: 10.X~11.0.0
Browser: [all ]
The text was updated successfully, but these errors were encountered: