-
-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Description
Describe the bug
When you pass the onChange function the checkbox stops changing state and stays either checked or unchecked.
If you remove onChange(), then it works but I cannot do anything based on if it was clicked or not. I think this.setState() is what is messing it up.
<Checkbox
label="Apples"
flexDirection="row"
initialValue={true}
onChange={(val) => {
if (val) {
this.setState({apples: false});
} else {
this.setState({apples: true});
}
}}
/>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels