You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sets isChecked to undefined, which means that the input created by SuveryQuestionCheckboxItem::renderCheckbox sets the checked attribute of the input item it creates to undefined. Having an undefined value for a checked attribute makes react decide that the item is uncontrolled. A later call to setState in SuveryQuestionCheckboxItem::handleOnChange makes react believe the input should be controlled and causes the warning to get thrown.
This issue is in
SurveyQuestionCheckboxItem::render
. The code:sets
isChecked
toundefined
, which means that the input created bySuveryQuestionCheckboxItem::renderCheckbox
sets thechecked
attribute of the input item it creates toundefined
. Having an undefined value for a checked attribute makes react decide that the item is uncontrolled. A later call tosetState
inSuveryQuestionCheckboxItem::handleOnChange
makes react believe the input should be controlled and causes the warning to get thrown.prevents the warning - I'll issue a pull request for this change.
HOWEVER: I'm not enough of a react guru to know if the value for the checkbox is being handled correctly from a react perspective or not.
The text was updated successfully, but these errors were encountered: