vendredi 21 février 2020

How to prevent firing input onChange after clicking on label?

I need to change checkbox state only by clicking input(checkbox) component.

Please suggest how to prevent input onchange being fired when label clicked?

<label className="selection_label">{title}<input value={value} checked={state[value]} type="checkbox" onChange={this.onCheckboxChange(value)} /> <span /></label>



Aucun commentaire:

Enregistrer un commentaire