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 the radio control checked property #3758

Merged
merged 1 commit into from Dec 21, 2017

Conversation

Projects
None yet
2 participants
@stevehenty
Contributor

stevehenty commented Dec 1, 2017

Description

The radio control is currently not displaying the checked value. This PR fixes the issue by changing the selected property to checked.

How Has This Been Tested?

Tested by adding a radio control to an inspector panel. The selected radio button is now displayed correctly when moving away and returning to the panel.

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • [] My code has proper inline documentation.
@@ -32,7 +32,7 @@ function RadioControl( { label, selected, help, instanceId, onChange, options =
name={ id }
value={ option.value }

This comment has been minimized.

@youknowriad

youknowriad Dec 20, 2017

Contributor

I think we can safely remove the value prop here, can we?

@youknowriad

youknowriad Dec 20, 2017

Contributor

I think we can safely remove the value prop here, can we?

This comment has been minimized.

@stevehenty

stevehenty Dec 20, 2017

Contributor

I tried removing the value prop but the radio button never gets selected so it seems to be required.

@stevehenty

stevehenty Dec 20, 2017

Contributor

I tried removing the value prop but the radio button never gets selected so it seems to be required.

This comment has been minimized.

@youknowriad

youknowriad Dec 21, 2017

Contributor

You're right! I don't know what happened in my testing 🙃

@youknowriad

youknowriad Dec 21, 2017

Contributor

You're right! I don't know what happened in my testing 🙃

@youknowriad

This comment has been minimized.

Show comment
Hide comment
@youknowriad

youknowriad Dec 20, 2017

Contributor

Sorry for the delay to review this PR. This got lost in the middle of the huge amount of PRs we have :)
This works well, I have a small comment above, I'd be happy to merge this once addressed.

Contributor

youknowriad commented Dec 20, 2017

Sorry for the delay to review this PR. This got lost in the middle of the huge amount of PRs we have :)
This works well, I have a small comment above, I'd be happy to merge this once addressed.

@youknowriad

Thanks for the fix 👍

@youknowriad youknowriad merged commit db193b6 into WordPress:master Dec 21, 2017

2 checks passed

codecov/project 37.67% remains the same compared to 245035b
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment