react-simple-star-rating icon indicating copy to clipboard operation
react-simple-star-rating copied to clipboard

Rating of more than 5 icons doesn't behave as expected

Open akshaydv opened this issue 3 years ago • 4 comments

I used the codesandbox demo to try out the project. Amazing project and thank you for this!

I wanted to have 10 star IMDb style rating on my website. I set iconsCount={10} but it doesn't look like the tooltipArray and fillColorArray are respected when there are more than 5 stars. For example, even on full rating, it still shows 5 out of 10.

image

This is the code

const tooltipArray = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];  

const fillColorArray = [
  "#f17a45",
  "#f17a45",
  "#f19745",
  "#f19745",
  "#f1a545",
  "#f1a545",
  "#f1b345",
  "#f1b345",
  "#f1d045",
  "#f1d045"
];  

<Rating
    onClick={handleRating1}
    ratingValue={rating1}
    size={50}
    iconsCount={10}
    allowHover
    transition
    showTooltip
    tooltipArray={tooltipArray}
    fillColorArray={fillColorArray}
  />

akshaydv avatar Jan 03 '22 04:01 akshaydv

I also have the same issue if you get any solution please tell me!

thearpitsharma avatar Jan 22 '22 04:01 thearpitsharma

The same problem is still in the app... if I use 10 stars, the app considers that we have only 5 stars. Please, help to solve this! image

katsiarynamanich avatar Jul 28 '22 10:07 katsiarynamanich

Sorry for the "very" late response. This issue should be fixed in the latest release

awran5 avatar Oct 03 '22 13:10 awran5

This is not working for more than 5 stars. Initial value and stars do not match up!

sagearora avatar Jul 23 '23 18:07 sagearora