Open s7dhansh opened 6 years ago
If the star value remains unchanged even after clicking the stars (due to a failure in the onChange method or otherwise), the stars retain their changed state, instead of reverting to the original.
value
onChange
I think https://github.com/n49/react-stars/blob/b3455bd492bc5efde050b834b55b01b2065e159b/src/react-stars.js#L91 must have this.props.value and not this.state.value. Let me know and I can push a PR.
this.props.value
this.state.value
If the star
value
remains unchanged even after clicking the stars (due to a failure in theonChange
method or otherwise), the stars retain their changed state, instead of reverting to the original.I think https://github.com/n49/react-stars/blob/b3455bd492bc5efde050b834b55b01b2065e159b/src/react-stars.js#L91 must have
this.props.value
and notthis.state.value
. Let me know and I can push a PR.