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

Radio buttons cannot be selected if the selected button has the same value #11368

Open
adamdport opened this issue May 16, 2018 · 0 comments
Open
Labels
area: material/radio P4 A relatively minor issue that is not relevant to core functions

Comments

@adamdport
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Clicking a radio button results in the selection of the button that was clicked

What is the current behavior?

If the radio button that was clicked has the same value as the currently selected radio button, the clicked button is not selected

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-pflvfa

What is the use-case or motivation for changing an existing behavior?

Sometimes we want the user can have multiple options that have the same result

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

Material 6

Is there anything else we should know?

I couldn't find anything in the spec (or anywhere) that stated two options with the same value was invalid

pfeigl added a commit to pfeigl/material2 that referenced this issue May 16, 2018
This allows multiple `<mat-radio-button>` with equal values within a `<mat-radio-group>`.
This is achieved by checking the actual selected property of the `<mat-radio-group>` instead
of checking the value.

This logic needed to be extended the pre-selection algorithms, too. Also we needed to check
not to select multiple radios in the init process.

This change did not contain any breaking changes and existing tests pass without adjustment.
pfeigl added a commit to pfeigl/material2 that referenced this issue May 16, 2018
This allows multiple `<mat-radio-button>` with equal values within a `<mat-radio-group>`.
This is achieved by checking the actual selected property of the `<mat-radio-group>` instead
of checking the value.

This logic needed to be extended the pre-selection algorithms, too. Also we needed to check
not to select multiple radios in the init process.

This change did not contain any breaking changes and existing tests pass without adjustment.

Fixes angular#11368
pfeigl added a commit to pfeigl/material2 that referenced this issue May 16, 2018
This allows multiple `<mat-radio-button>` with equal values within a `<mat-radio-group>`.
This is achieved by checking the actual selected property of the `<mat-radio-group>` instead
of checking the value.

This logic needed to be extended the pre-selection algorithms, too. Also we needed to check
not to select multiple radios in the init process.

This change did not contain any breaking changes and existing tests pass without adjustment.

Fixes angular#11368
pfeigl added a commit to pfeigl/material2 that referenced this issue May 16, 2018
This allows multiple `<mat-radio-button>` with equal values within a `<mat-radio-group>`.
This is achieved by checking the actual selected property of the `<mat-radio-group>` instead
of checking the value.

This logic needed to be extended the pre-selection algorithms, too. Also we needed to check
not to select multiple radios in the init process.

This change did not contain any breaking changes and existing tests pass without adjustment.

Fixes angular#11368
@andrewseguin andrewseguin added the P4 A relatively minor issue that is not relevant to core functions label May 30, 2019
@mmalerba mmalerba removed the has pr label Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/radio P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants