Rating component dynamic value #788
Replies: 1 comment 2 replies
-
I suspect this is in your implementation, because the component will start with whatever value you provide either via attribute or property. This example starts with a value of 4: https://codepen.io/claviska/pen/NWyoEzG?editors=1010
This isn't what's supposed to happen, and I'm not able to replicate it. Internally, there's Sorry, this probably isn't incredibly helpful to you but I don't see anything wrong in the component itself. |
Beta Was this translation helpful? Give feedback.
-
I was using
<SlRating />
component with usehook-ts, and I want to save the user's rating in localStorage so next time they visit the same page they can see the rating. Now the current behavior I am getting is after user interact with the rating component, when they come back again the value is always 5 out of 5 no matter what their input was.my code:
Also the value changes when I hover on the component without even clicking it, I don't know if this is the default bahavior but it feels unnatural
Beta Was this translation helpful? Give feedback.
All reactions