Usecase:
Im trying to get an InputGroup with one child element disabled and one not:
<InputGroup>
<TextField
label="First name"
disabled
/>
<TextField
label="Last name"
/>
</InputGroup>
Problem:
In the above example:
Current behaviour: none of the TextFields is disabled
Expected behaviour: The First name TextField is disabled
Likely cause is
|
if (contextValue != null) { |
where the
contextProp is checked for being
null /
undefined but not against being
false.
Solution:
We need to figure out how to take into account the default prop value in
|
if (contextValue != null) { |
. Assuming the default is
null /
undefined does not work for bool typed props.
Usecase:
Im trying to get an
InputGroupwith one child element disabled and one not:Problem:
In the above example:
Current behaviour: none of the
TextFields is disabledExpected behaviour: The
First nameTextFieldis disabledLikely cause is
react-ui/src/components/_helpers/resolveContextOrProp.js
Line 2 in d532592
contextPropis checked for beingnull/undefinedbut not against beingfalse.Solution:
We need to figure out how to take into account the default prop value in
react-ui/src/components/_helpers/resolveContextOrProp.js
Line 2 in d532592
null/undefineddoes not work for bool typed props.