angular / angular/components

Radio-group's value not updated when the selected radio-button's value changes

オープン
#9,808 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/radio help wanted P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされたStackBlitzの再現例から始め、issueで説明されているラジオボタンのバインディング動作を調べます。選択中のボタンの変化する値とグループのngModelを比較し、報告されている回避策を参考にします。選択中のラジオボタンの値が変わったときにngModelが更新されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。