Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
akshaydv opened this issue Jan 3, 2022 · 4 comments
Open

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

akshaydv opened this issue Jan 3, 2022 · 4 comments

Comments

@akshaydv
Copy link

akshaydv commented Jan 3, 2022

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

@thearpitsharma
Copy link

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

esaracco added a commit to esaracco/react-simple-star-rating that referenced this issue Mar 11, 2022
awran5 added a commit that referenced this issue Mar 11, 2022
@katsiarynamanich
Copy link

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

@awran5
Copy link
Owner

awran5 commented Oct 3, 2022

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

@sagearora
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants