Reputation: 1034
I am building an application using react, so I was using react-select
library for select elements. I have followed the documentation and used it, but unfortunately the options are displaying in blue color, whereas if we see in the tutorial they are transparent, only the selected item highlights.
Here's the codesandbox url : https://codesandbox.io/s/pwkl54q2jj
What workarounds I have tried:
CategoryForm
component to App
component where the state lies. Didn't workNothing works... Anyone help out here???
I hope I have provided all the info that's needed. Please comment if you need any more information.
Upvotes: 2
Views: 4146
Reputation: 507
Figured it out. Swap the name
key for value
in your categories array and it works.
https://codesandbox.io/s/rm7pnv2xpq
Upvotes: 1