Open D1scoDancer opened 1 year ago
You can do this, but it is not elegant. You’ll have to access the DOM (radio) element and directly set the checked
property on the correct radio element. Here is a similar example:
https://github.com/Craig-Creeger/react-likert-scale/discussions/19#discussioncomment-961251
Hi! Firstly, great lib. Thank you! Secondly, I have a quiz app with "Back" and "Next" buttons. I save a user's answers to an array using chosen.text, using some of this code
I also use this "reset tutorial" to clear Likert scale for next question, when I press "Next" button.
I would like to have functionality to restore my answer on a Likert scale on "Back" click. As I said answers are stored in the array. Is it possible to pick a point on a Likert scale using code?
Code in case you need it. Sorry, it is a bit messy.