setValues not working for react-select #1842
-
i am trying to set value onchange of react select, since react select returns object rather value, i need to get value and set it to my object Here is my codesandbox appreciate any help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Take a look at this example: https://codesandbox.io/s/react-hook-form-controller-079xx which have react-select and try to work on top of it and compare the diff. |
Beta Was this translation helpful? Give feedback.
-
@bluebill1049 thanks for the reply, in that example there is no explicit setValue for react-select. |
Beta Was this translation helpful? Give feedback.
@bluebill1049 thanks for the reply, in that example there is no explicit setValue for react-select.
without setValue here what data looks like. as per my requirement member should be array of string rather object
{ "tag": { "member": [ { "value": "chocolate", "label": "Chocolate" }, { "value": "strawberry", "label": "Strawberry" } ] } }