gogoair / react-combo-select

React dropdown for select and multiselect
MIT License
28 stars 9 forks source link

how can we give initial values #15

Closed HPsunilkumar closed 6 years ago

HPsunilkumar commented 6 years ago

thanks for your efforts, and i need to select some values in initial time of rendering how can i give that values? value={standardArray[2]} is not working

markokostovski commented 6 years ago

This is kinda bare minimum for your setup. You need to have both data and value, but value has to be inside of data.

`const standardArray = ["JA007D", "JA008D", "JA009D", "JA010D"];

` I can think that you can have problem if you use `map`. Anyway, copy little more code here, so that we can be more helpful :D
HPsunilkumar commented 6 years ago

Thank you markokostovski for your kind help

markokostovski commented 6 years ago

You're welcome :D