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

fix: force a name attribute on radio inputs #1435

Conversation

tbouliere-datasolution
Copy link
Contributor

@tbouliere-datasolution tbouliere-datasolution commented May 25, 2023

PR Type

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

The name attribute of radio inputs is not set.
If we bind a [formGroup] on the input, angular considers that the radio button is global.
It is therefore impossible to create several different groups of radio buttons on the page (changing one of the buttons will erase the status of the others).

Issue Number: Closes #

What Is the New Behavior?

Radio inputs now have a correctly filled name attribute.
This fix prevents this unexpected behavior.

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

Radio inputs now have a correctly filled name attribute.
When this attribute is not set and we bind
a [formGroup] on the input, angular considers that the radio button is global.
It is therefore
impossible to create several different groups of radio buttons on the page (changing one of the
buttons will erase the status of the others).
This fix prevents this unexpected behavior
@SGrueber SGrueber self-requested a review June 1, 2023 13:25
@SGrueber SGrueber added the bug Something isn't working label Jun 1, 2023
@SGrueber SGrueber added this to the 4.1 milestone Jun 1, 2023
@SGrueber
Copy link
Collaborator

SGrueber commented Jun 2, 2023

@tbouliere-datasolution : Thank you very much for this bugfix ! :-)

@SGrueber SGrueber merged commit a8f0817 into intershop:develop Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants