react-native-ratings icon indicating copy to clipboard operation
react-native-ratings copied to clipboard

onFinishRating always returns initial value

Open tfsjohan opened this issue 6 years ago • 3 comments

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)}/>

tfsjohan avatar Feb 25 '18 15:02 tfsjohan

I get the same wrong.i think the rating only can move, but it can't click

neilzhengzx avatar Feb 28 '18 02:02 neilzhengzx

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

Monte9 avatar Mar 07 '18 08:03 Monte9

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.

smemamian avatar Mar 16 '19 10:03 smemamian