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
998 stars 297 forks source link

Ignore Keyboard when selecting item in listMode="MODAL" #642

Open Bochereau opened 1 year ago

Bochereau commented 1 year ago

Hi there.

I use a dropdown-picker to select a city in a list. For this I use the listMode="MODAL" with a search input. When I click to select a city the keyboard close first. So I have to click a second time to select a city and close the modal. So I'd like to skip the keyboard close action then I don't have to double click when selecting a city. In the same idea of keyboardShouldPersistTaps in ScrollView.

Someone has an idea for this ?

VashaMasha commented 1 year ago

Hi! the solution is to add this prop flatListProps={{ keyboardShouldPersistTaps: "always" }} https://github.com/hossein-zare/react-native-dropdown-picker/issues/235#issuecomment-859924303