react-native-ratings
react-native-ratings copied to clipboard
onFinishRating always returns initial value
When clicking a star I always get the same score, regardless of what star I press. What am I doing wrong?
(In this case, score is always 2 in onFinishRating)
<Rating
type={'star'}
imageSize={20}
ratingCount={5}
startingValue={2}
onFinishRating={(score: number) => this.rank(item, score)}/>
I get the same wrong.i think the rating only can move, but it can't click
Yes, that's right. For now.. sliding & clicking is a missing feature for the <Rating />
component.
If you are only interested in the click feature.. then you can use the <AirbnbRating />
component which has simple animations too.
If someone has some time, please submit a PR for it. Thanks
Yes, that's right. For now.. sliding & clicking is a missing feature for the
<Rating />
component.If you are only interested in the click feature.. then you can use the
<AirbnbRating />
component which has simple animations too.If someone has some time, please submit a PR for it. Thanks
but when you are using AirbnbRating
you missing the touch rating feature.