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
When no default value is specified for a prop of type boolean (PropTypes.bool) in args, a warning, A component is changing an uncontrolled input of type checkbox to be controlled. appear in the browser console when toggling the prop on the Controls panel.
This warning doesn't occur when you provide the boolean prop with a value in args.
importReactfrom"react";importRadiofrom"./Radio";exportdefault{title: "Components/Radio",component: Radio,args: {label: "Remember me",// disabled: false, // The error doesn't occur with this},};exportconstDefault=(args)=><Radio{...args}/>;
Expected behavior
There should be no warning when toggling a boolean control.
Describe the bug
When no default value is specified for a prop of type boolean (
PropTypes.bool
) inargs
, a warning,A component is changing an uncontrolled input of type checkbox to be controlled.
appear in the browser console when toggling the prop on the Controls panel.This warning doesn't occur when you provide the boolean prop with a value in
args
.Expected behavior
There should be no warning when toggling a boolean control.
System:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: