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(sbb-radio-button-group): sync radios synchronously #3323

Merged
merged 5 commits into from
Dec 20, 2024
Merged

Conversation

jeripeierSBB
Copy link
Contributor

Closes #3316

@jeripeierSBB jeripeierSBB requested review from TomMenga and removed request for kyubisation December 19, 2024 17:08
@github-actions github-actions bot added the pr: peer review required A peer review is required for this pull request label Dec 19, 2024
@github-actions github-actions bot temporarily deployed to pr3323 December 19, 2024 17:30 Inactive
@github-actions github-actions bot temporarily deployed to pr3323-diff December 19, 2024 17:31 Inactive
Comment on lines 74 to 80
it('should respect disabled radio in value getter', async () => {
const radio = radios[0];
radio.checked = true;
radio.disabled = true;
await waitForLitRender(element);

expect(element.value).to.be.null;
expect(element.value).to.be.equal('Value one');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this is the desired behavior? Natively, the FormData would be empty in this case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the same? Here it is the group while native there is no group?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My doubt is, should the group.value consider disabled radios?

In this case, both the native and our implementation would return an empty FormData (as if nothing were selected).
Meanwhile the sbb-radio-group returns Value one. I feel it is inconsistent :/

@jeripeierSBB jeripeierSBB merged commit 720dda2 into main Dec 20, 2024
15 of 16 checks passed
@jeripeierSBB jeripeierSBB deleted the fix-radio branch December 20, 2024 12:18
@github-actions github-actions bot removed the pr: peer review required A peer review is required for this pull request label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: SbbRadioButtonGroup does not reset old checked radio button after checking another one
2 participants