React Bootstrap Form.Check working on only double click

Viewed 527

I have a Form.Check element I am using in my React app. For some reason only if I click twice in the check box will the actual check mark change. This is causing my handleChange function to not shoot properly. I already tried using onClick but that will just not allow a change at all to the check box. Can anyone pinpoint what the issue might be?

<Form.Check onChange={this.handleChange} inline label="Allow Text" type="checkbox" defaultChecked={this.props.allowtext} defaultValue={this.props.allowtext} />

1 Answers

The problem is on handleChange function. You should remove event.preventDefault(); call.

Related