Fix value prop to keep SelectInput's input as controlled#8048
Conversation
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
| }; | ||
|
|
||
| const getLabel = () => { | ||
| let label; |
There was a problem hiding this comment.
label was always undefined and when getLabel didn't get to inner block (!empty && !props.fixedPlaceholder), the returned value would be undefined causing the input's prop value to also be undefined. That led to react thinking the input was uncontrolled. Afterwards, if anything changes the input's prop value to be non-undefined, react will trigger the uncontrolled to controlled warning.
80f8ba1 to
9461ace
Compare
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
Fixes #7896.