luqin / react-icheck

:radio_button: iCheck components built with React. Highly customizable checkbox, radio buttons and radio group.
https://luqin.github.io/react-icheck
177 stars 40 forks source link

Moved stopPropagation and prevent default to always trigger on ins onChange #14

Closed alex-e-leon closed 8 years ago

alex-e-leon commented 8 years ago

onChange

Update to my previous fix to add preventDefault and stopPropagation in order to always trigger even if there is no onChange handler or no label set. Otherwise the double-trigger bug still exists when there is a label but no onChange handler.

alex-e-leon commented 8 years ago

@luqin Apologies, I just found that the bug still existed under some conditions with my previous fix. This should fix it for good though by moving it outside the if statement.