alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Set options selected manually #110

Closed robinprashanth closed 7 years ago

robinprashanth commented 7 years ago

I am using react super select in my project.I am facing issue where i need to reset the option selected to first object in the array.

Steps to reproduce 1)select some value from the dropdown 2)I have a button event-> when clicked-> reset the selected option to the fist option or desired option in the dropdown.

Hope you can help me

alsoscotland commented 7 years ago

@robinprashanth any outside event that updates the super-select's initialValue prop should result in that value being selected

robinprashanth commented 7 years ago

Unfortunately i am unable to set the initialValue. InitialValue works only once

robinprashanth commented 7 years ago

I found the solution.Thanks for the help.

alsoscotland commented 7 years ago

Glad to hear it