Radio button not updated when using reactive forms
See original GitHub issue“carbon-components-angular”: “^4.12.1”,
When creating a form with reactive forms the radio button does not get checked when loading that form
The write function of the ControlValueAccessor works as designed but there’s no action to refresh the component to reflect this state
the solution is to update the write function with a refresh of the radios
changing to
RadioGroup.prototype.writeValue = function (value) {
this.value = value;
var _this = this;
setTimeout(function () {
_this.updateSelectedRadioFromValue();
_this.checkSelectedRadio();
});
};
let me know if i need to make a pull request for this
thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Radio button not updated when using reactive forms #1464
Today radio module cannot be used in reactive forms , and as i'm migrating from another angular form library i have to stick...
Read more >pre-selecting material radio button using reactive forms not ...
I'm using Reactive Forms and want to pre-select the first radio button which has a value of 'true'. I initialize the value of...
Read more >Angular Radio Buttons Reactive Forms Tienanhvn - StackBlitz
Learn to create advance Angular 7 Reactive Forms using ReactiveFormsModule API from scratch with advanced Reactive Forms validation.
Read more >Angular 14 Radio Buttons Tutorial with Example - positronX.io
Understand how to create Radio Buttons in Angular application using the Template-Driven and Reactive Forms API, individually.
Read more >Angular Radio Button with Reactive Form Tutorial
If you need to see example of angular radio button group reactive form. In this article, we will implement a how to use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I responded to your other issue with the installation issues, so hopefully we can get that sorted! Otherwise, thanks for opening the issue 👍
🎉 This issue has been resolved in version 4.15.2 🎉
The release is available on:
Your semantic-release bot 📦🚀