FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(Radio): fix warning from undefined starting params by kmcfaul · Pull Request #2292 · patternfly/patternfly-react · GitHub

fix(Radio): fix warning from undefined starting params - #2292

Merged
jschuler merged 2 commits into
patternfly:masterfrom
kmcfaul:fix-radio-warning
Jun 27, 2019
Merged

fix(Radio): fix warning from undefined starting params#2292
jschuler merged 2 commits into
patternfly:masterfrom
kmcfaul:fix-radio-warning

Conversation

kmcfaul commented Jun 18, 2019

Copy link
Copy Markdown
Contributor

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

Refer to issue: #2028

Copy link
Copy Markdown
Collaborator

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

disabled={isDisabled}
checked={checked || isChecked}
defaultChecked={isChecked ? undefined : defaultChecked}
{...!isChecked && { defaultChecked }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

jschuler merged commit fe708e1 into patternfly:master Jun 27, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL