onRate function never returns the original event
pantchox opened this issue · 2 comments
pantchox commented
Hi,
I have created a onRate function which is getting called if i hover/click etc
but i want it to be called only when it is clicked, in the readme it is mentioned when it is NOT click it will return an object with property of originalEvent: Event
which i never get on either event.
Thanks.
NdYAG commented
Hi @pantchox
Thanks for reporting the bug! You could now update to 0.4.2 and handle the callback argument like this:
https://github.com/NdYAG/react-rater/blob/master/example/index.js#L36
rating
is now passed with the SyntheticEvent's other attributes.
Check out the recent commit here ae8c786
pantchox commented
thanks it works now :)