You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build a rating system where you can reset the rating back to 0 by clicking on whatever star has already been set to the current value. For example, if a rating is showing 4 / 5 stars, clicking on the 4th star would remove the rating entirely.
I am using the initialValue prop and a controlled input as suggested,but the stars do not reset visually even though the state changes. I also built in a secondary button to test out the function and it it capable of clearing the rating.
Is there any way around this? Tried using a timeout and that didn't work
The text was updated successfully, but these errors were encountered:
I am trying to build a rating system where you can reset the rating back to 0 by clicking on whatever star has already been set to the current value. For example, if a rating is showing 4 / 5 stars, clicking on the 4th star would remove the rating entirely.
I am using the initialValue prop and a controlled input as suggested,but the stars do not reset visually even though the state changes. I also built in a secondary button to test out the function and it it capable of clearing the rating.
Is there any way around this? Tried using a timeout and that didn't work
The text was updated successfully, but these errors were encountered: