danish1658 / react-native-dropdown-select-list

☝️ React Native Select List Equivalent to Html's Select with options"
https://www.npmjs.com/package/react-native-dropdown-select-list
MIT License
200 stars 89 forks source link

defaultOption Support for multiple selection #67

Open onuraskinn opened 1 year ago

onuraskinn commented 1 year ago

I was using MultipleSelection in my react-native project , defaultOption props was not work , I have tried to add defaultSelected prop inside of this library . I also tested myself and it seems working ok for now you can also test it by yourself.

RafaelCENG commented 1 year ago

Hi thanks for the commiting. What happends if my default is async? Waiting my API call to retrieve my default values. Renders empty array at the start because my state is empty at the start

onuraskinn commented 1 year ago

On your scenario , the code should have work as expected because the defaultOption variable set as any[] . You can also render whole component based on ur async API call result with conditional rendering.

Gugarauj07 commented 9 months ago

I need to use defaultOptions on multipleSelect, please accpet this pull request asap!!!

ricardogomez-dev commented 2 days ago

Please merge this fix into the library