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

Ratings broken! #23

Open
jeremyrajan opened this issue Oct 1, 2022 · 1 comment
Open

Ratings broken! #23

jeremyrajan opened this issue Oct 1, 2022 · 1 comment

Comments

@jeremyrajan
Copy link

Thanks for lib :)

Just trying to implement it using floating values for 5 star rating component. Doesnt seem to work. It weird that for 5 it somehow is taking as 0.5 or less (if you look closely)

<Rating
                  className="flex"
                  ratingValue={5}
                  readonly
                  transition
                  size={20}
                  allowHalfIcon
                  fillColorArray={[
                    "#f17a45",
                    "#f19745",
                    "#f1a545",
                    "#f1b345",
                    "#f1d045",
                  ]}
                />

image

Not sure, what I am doing wrong

@awran5
Copy link
Owner

awran5 commented Oct 3, 2022

Check this codesandbox it may help you . Also, please update to the latest version to avoid any possible bugs.

Also, you may need to use initialValue prop. Check this example

Let me know if still you need any help.

Thank you.

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

2 participants