prndcompany / reactsvgstarrating Goto Github PK
View Code? Open in Web Editor NEWThe React component for star rating
The React component for star rating
Nice component, thanks!
However, I'm missing className for a div
container in your StarRating component.
Would be cool to have an additional prop like containerClass ๐
Hello!
Thanks for the library. I've been using it successfully, but recently ran across this issue.
We have a Card
component that cycles through data containing stars. If we have a first star rating of 3.0, then the next is 0.0, the rating still shows 3.0.
It looks like this is because if the incoming rating is 0, it is not updated, as shown in this line in StarRating.tsx
:
useEffect(() => {
if (initialRating !== 0) {
setSelectedValue(initialRating);
}
}, [initialRating]);
Any reason for filtering out zero here?
We can try workarounds such as setting 0.000001 to force this to take effect, but it is not ideal.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.