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(Radio): fix warning from undefined starting params #2292

Merged
merged 2 commits into from Jun 27, 2019

Conversation

@kmcfaul
Copy link
Contributor

kmcfaul commented Jun 18, 2019

What: Fixes warning re: controlled/uncontrolled switch. Also fixes warning for missing prop on uncontrolled radio.

Refer to issue: #2028

@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Jun 18, 2019

PatternFly-React preview: https://patternfly-react-pr-2292.surge.sh

className={css(styles.radioInput)}
type="radio"
onChange={this.handleChange}
aria-invalid={!isValid}
disabled={isDisabled}
checked={checked || isChecked}
defaultChecked={isChecked ? undefined : defaultChecked}
{...!isChecked && { defaultChecked }}

This comment has been minimized.

Copy link
@jschuler

jschuler Jun 27, 2019

Collaborator

defaultChecked is an attribute passed to input? what does it do?

This comment has been minimized.

Copy link
@kmcfaul

kmcfaul Jun 27, 2019

Author Contributor

I think it's required for the uncontrolled version of radio. The undefined was throwing a console error.

@jschuler jschuler merged commit fe708e1 into patternfly:master Jun 27, 2019
8 checks passed
8 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_integration Your tests passed on CircleCI!
Details
ci/circleci: build_pf3_docs Your tests passed on CircleCI!
Details
ci/circleci: build_pf4_docs Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test_jest_other Your tests passed on CircleCI!
Details
ci/circleci: test_jest_pf4 Your tests passed on CircleCI!
Details
ci/circleci: upload_docs Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.