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 update a label next to the ratings that show some text depending on the star selected (or the one you're hovering over).
The problem is that when I use both functions, the onChange method does not get triggered.
handleClickRating(value) {
this.setState({ newValue: value });
}
handleHoverRating(value) {
if (value) {
this.setState({ newValue: value });
}
}
Is there any error on my side? I tried also to have two states (one for the clicked value and one for the hovered one) but click event didn't fire anyway.
Thanks!
The text was updated successfully, but these errors were encountered:
I am not sure what is the issue you are having... but... let me show you a small example using both onChange and onHover at the same time. Maybe it could help you out to find out where is the problem.
This is a component that shows below the rating element two labels. One with the current selected rating and the other one with the rating you are hovering.
Hey,
I am trying to update a label next to the ratings that show some text depending on the star selected (or the one you're hovering over).
The problem is that when I use both functions, the onChange method does not get triggered.
handleClickRating(value) {
this.setState({ newValue: value });
}
handleHoverRating(value) {
if (value) {
this.setState({ newValue: value });
}
}
Is there any error on my side? I tried also to have two states (one for the clicked value and one for the hovered one) but click event didn't fire anyway.
Thanks!
The text was updated successfully, but these errors were encountered: