ComboBox/ListBox Multiple question #2901
Unanswered
jamierytlewski
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Why does the Combo and List box come back with the names as arrays instead of all the same name so they can be true HTML arrays? It doesn't make sense that the names are
test[0]
andtest[1]
when they could easily just all be named test and then when you useFormData
it returns the proper array. Right now it's returns the values astest[0]
andtest[1]
instead of test being a true array.An example is with React Hook Form. When we pass it the name it's expecting
test
, nottest[0]
,test[1]
, etc. Also, if you want to do something likedocument.getElementsByTagName('test')
it doesn't work since we don't know how many tests are there unless we look at the state of the object.I propose following the HTML standards and allowing the name to be duplicated so that it's easier to send back as an array and will work with React Hook Form. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions