MultiSelect - get values onChange as array of objects with data #1176
Answered
by
rtivital
alexHlebnikov
asked this question in
Q&A
-
Hi. I have this data structure:
I'm using value same as label to use searchable I can get only array of values onChange, but I need my object or particular fields from it. Is there a way I can get id, type and region in onChange handler? |
Beta Was this translation helpful? Give feedback.
Answered by
rtivital
Apr 4, 2022
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
alexHlebnikov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<MultiSelect onChange={values => { console.log(values.map(value => data.find(item => item.value === value))) }} />