I'm confused a bit about how react handles onChange events for radio inputs:
var Hello = React.createClass({
onChange: function(e) {
console.log(e);
},
render: function() {
return (
<form onChange={this.onChange}>
<input type='radio' name='a' value="1" />
<input type='radio' name='a' value="2" />
<input type='checkbox' name='a' />
<input type='checkbox' name='a1' />
</form>
)
}
});
It seems for radio it fires event just once whereas for the checkbox type it works as expected?
what am i doing wrong?
please consider the fiddle