Closed mathiscode closed 3 years ago
A ref could be useful as well - my use-case got a bit convoluted, but the main issue was I was detecting the legend innerText to find the question for each particular scale, then doing some actions based on that. However, the question is internationalized so I couldn't rely on that, which led me to set an id
with a hash of the English question. That solved my immediate problem.
I'm absolutely confident there was a better way to solve my problem, but client deadlines made me desperate. 😅
By the way, thank you for this project - I was dreading creating this from scratch!
I will be upgrading the dependencies and adding in the ability to pass in a ref prop. Additionally, it will still support id
, plus any other valid DOM element attribute. It should be backwards compatible with this version.
It will be done within the next couple of days.
Thanks for the contribution, @mathiscode . I like being able to set an
id
on the fieldset. What do you think about setting a ref on the fieldset instead? Out of curiosity, what is your use-case for theid
?Obviously, I have not done much to this repo in a long time, and would like to update it a bit and possibly convert it to use functional components and hooks.