Closed mohitgarg closed 3 years ago
MultipleSelect only pre-fills only if the values is an array of strings. If I am passing an array of objects like you do with selectOptions on onChange, input field doesn't get populated.
values
selectOptions
onChange
Here's the sandbox link: https://codesandbox.io/s/friendly-minsky-xw6il
Hi @mohitgarg,
This is by design. You can take your SelectOptions and extract the values in an array which is provided to MultipleSelect's values prop.
Cheers, Iulian
MultipleSelect only pre-fills only if the
values
is an array of strings. If I am passing an array of objects like you do withselectOptions
ononChange
, input field doesn't get populated.Here's the sandbox link: https://codesandbox.io/s/friendly-minsky-xw6il