angular / angular/components

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

Đang mở
#9,808 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/radio help wanted P4
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và kiểm tra hành vi binding radio được mô tả trong issue. So sánh giá trị thay đổi của nút được chọn với ngModel của nhóm, dựa trên workaround được báo cáo; hoàn thành khi ngModel cập nhật lúc giá trị của nút radio được chọn thay đổi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.