react-simple-star-rating
react-simple-star-rating copied to clipboard
Rating of more than 5 icons doesn't behave as expected
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.
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}
/>
I also have the same issue if you get any solution please tell me!
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!
Sorry for the "very" late response. This issue should be fixed in the latest release
This is not working for more than 5 stars. Initial value and stars do not match up!