Skip to content
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

Setting md-radio-group value dynamically does not change 'checked' property of md-radio-button #1152

Closed
james11a opened this issue Sep 1, 2016 · 3 comments · Fixed by #1735
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@james11a
Copy link

james11a commented Sep 1, 2016

Bug, feature request, or proposal:

Bug:
Setting md-radio-group value dynamically does not change 'checked' property of md-radio-button (md-radio-checked class is not enabled for this radio button)

What is the expected behavior?

When md-radio-group value is changed to one of the md-radio-button values, the corresponding radio button should get checked (md-radio-checked class should be enabled for the radio button)

What is the current behavior?

Initial md-radio-group value ensures that correct radio button is checked when application starts but changing the md-radio-group value dynamically does not do the same.

What are the steps to reproduce?

  1. Visit plunker: http://plnkr.co/edit/rzemQv9oNEpt4yOYuT0u?p=preview
    Initial value of md-radio-group is set to 'Jack' which is same as the value of '1st radio button (Custom Name)'. Here the Custom Name radio button is checked, so it works as required.

  2. Select 2nd radio button (Default), then the Default radio button gets checked, md-radio-group value is also updated.

  3. Now change the custom name to say 'xyz', the md-radio-group value & the 'Custom Name' radio button values get updated to 'xyz' but the md-radio-checked class is not set for 'Custom Name' radio.

Which versions of Angular, Material, OS, browsers are affected?

The example in plunker is with Angular 2.0.0-rc.1 & material 2.0.0-alpha.5 but the problem is also reproduced with the latest Angular 2.0.0-rc.5 & material 2.0.0-alpha.7-4 which I am using at work.

@jelbourn
Copy link
Member

jelbourn commented Nov 4, 2016

@tinayuangao is this still an issue in master?

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Nov 4, 2016
@tinayuangao
Copy link
Contributor

Yes, this is still an issue in master.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants