hossein-zare / react-native-dropdown-picker

A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.
https://hossein-zare.github.io/react-native-dropdown-picker-website/
MIT License
970 stars 294 forks source link

Adding Auto Focus when opening modal with searchable #675

Open BatuhanCakir opened 1 year ago

BatuhanCakir commented 1 year ago

Is there a way to set the Search Component Text input to Autofocus ?. I even think it could be the default behaviour.

travisfalls commented 10 months ago

I was able to do this by adding this.

searchTextInputProps={{ autoFocus: true }}

julianpensionjar commented 1 month ago

I was able to do this by adding this.

searchTextInputProps={{ autoFocus: true }}

Did you also manage to get the keyboard to open? When I add autoFocus: true I can see the cursor flashing in the field, but the keyboard has not opened. I can also not find any way to pass a reference into the TextInput to be able to manually call focus() with the onOpen function.