ionic2-rating icon indicating copy to clipboard operation
ionic2-rating copied to clipboard

How a user give half star rating

Open thomaspessato opened this issue 6 years ago • 5 comments

First of all, let me say thank you for this very nice component!

Is there a way I can tap on a star and, according to the place, gives a half star rating?

In my case, I want to have a 1-10 range, but only 5 stars...

Thanks for your attention!

thomaspessato avatar Mar 22 '18 23:03 thomaspessato

Hey, @thomaspessato. I am glad to hear that this component was helpful.

Unfortunately, there is no way to know exactly where the user clicked. The only event fired is related to the selected value. There is actually a way you can make the component select a half star, though.

Take a look at #36 and its comments. It is possible to listen to change events and when the user clicks on the same star, you can subtract 0.5 from the ngModel value.

andrucz avatar Mar 23 '18 03:03 andrucz

Thanks for clarifying! I'll take a look at #36, thanks!

thomaspessato avatar Mar 23 '18 03:03 thomaspessato

I will keep this issue open and see if it is possible to fire a more detailed event, including some information about click position, etc.

andrucz avatar Mar 23 '18 03:03 andrucz

Maybe ionic gestures could be useful here

thomaspessato avatar Mar 23 '18 03:03 thomaspessato

+1

dfliess avatar Jul 13 '18 17:07 dfliess