-
I am attempting to use https://codesandbox.io/s/react-select-issue2021b-ohr9q?file=/src/App.js
Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
Rall3n
Nov 25, 2021
Replies: 1 comment 4 replies
-
Hello @SKempin, I hope you don't mind me converting your issue to a discussion as it seemed a more appropriate place for your question. There are a couple of problems with what you are trying to do:
These fixes should suffice to see your result in the component. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
SKempin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @SKempin,
I hope you don't mind me converting your issue to a discussion as it seemed a more appropriate place for your question.
There are a couple of problems with what you are trying to do:
console.log
call causes thedata
parameter in the next chain to be empty.callback
expects the first parameter to be an array of options, but you send the whole data as part of an object as the second parameter. Correct is:{value,label}
or use thegetOptionValue
andgetOptionLabel
props.