Can I store the values as an array of values instead of an array of objects #264
Unanswered
barrymichaeldoyle
asked this question in
Q&A
Replies: 1 comment
-
Sure, there are a couple different issues/discussions outlining how to do this already, but here's an example: https://codesandbox.io/s/qf1v1r?file=/app.tsx Here's some discussions with similar requests/solutions: #105 #111 #175 #251 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TLDR;
I'm using this with
react-hook-form
, but my validation schema checks for an array of strings for my select value. Instead the values coming fromonChange
and stored on my Select component come in the format[{ label: "Value 1", value: "value1"}, ...]
. I'm expecting['value1', ...]
to be evaluated, not the array of objects.I've posted a StackOverflow question here:
https://stackoverflow.com/questions/76383509/react-hook-form-with-react-select-how-to-save-values-as-an-array-of-values-inste
I know this is technically a
react-select
issue but this library has much better support thanreact-select
does so I'm trying my luck here as well.Beta Was this translation helpful? Give feedback.
All reactions