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 RadioGroup to support zero as a Radio value #27906

Merged
merged 2 commits into from
Jan 6, 2021

Conversation

stokesman
Copy link
Contributor

There's an oversight in the RadioGroup component that makes it fail to allow a Radio with a value of 0 to be checked. Since the component does not appear to be used anywhere I've updated one of its Storybook stories to demonstrate the use case.

Screen recordings

Before fails to “check” the Radio with the zero value.

radio-group-zero-index.mp4

After

radio-group-zero-index-after.mp4

How has this been tested?

In a custom block using WP 5.6 and in Storybook

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@youknowriad youknowriad added [Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended labels Dec 30, 2020
@youknowriad youknowriad merged commit d94b354 into WordPress:master Jan 6, 2021
@github-actions github-actions bot added this to the Gutenberg 9.8 milestone Jan 6, 2021
@stokesman stokesman deleted the fix/radio-group branch January 6, 2021 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants