| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
|
PatternFly-React preview: https://1929-pr-patternfly-react-patternfly.surge.sh |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #1929 +/- ##
==========================================
+ Coverage 82.63% 82.64% +0.01%
==========================================
Files 624 624
Lines 6875 6879 +4
Branches 93 94 +1
==========================================
+ Hits 5681 5685 +4
Misses 1154 1154
Partials 40 40
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
Done 👍 |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What:
closes #1959
I first realized that the controlled Checkbox example is wrong: event.target.name is not set and so the state can be {check1: false, check2: false, '': false} or {check1: false, check2: false, '': true}.
After fixing it by adding the name attribute to the Checkbox components the first time I checked one of the boxes I got the following error/warning message:
Warning: A component is changing an uncontrolled input of type checkbox to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components in input (created by Checkbox) in div (created by Checkbox) in Checkbox (created by ControlledCheckbox) in ControlledCheckbox (created by ErrorBoundary) in ErrorBoundary (created by Context.Consumer)It looks like the expression isChecked || checked will return undefined if isChecked is false and so when checking the box that expression changed to true which causes the component to turn to be controlled.
//cc @dlabrecq
fixes https://github.com/project-koku/koku-ui/issues/841