Radio-group's value not updated when the selected radio-button's value changes
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
`value` input of MatRadioButton to update `ngModel` of MatRadioGroup when selected.
#### What is the current behavior?
MatRadioGroup's value updates but not the `ngModel`.
#### What are the steps to reproduce?
https://stackblitz.com/edit/radio-binding?file=app%2Fapp.component.html
#### What is the use-case or motivation for changing an existing behavior?
Custom radio option with input
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular and Material 5.0
#### Is there anything else we should know?
Calling `radioGroup._controlValueAccessorChangeFn($event);` on `(ngModelChange)` is a work around.
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and inspect the radio binding behavior described in the issue. Compare the selected button's changing value with the group's ngModel, using the reported workaround as context; done means the ngModel updates when the selected radio button's value changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100