1

Here is my code:

<ScrollView keyboardShouldPersistTaps="always" keyboardDismissMode="interactive">
  <Autocomplete {bunch of options}>
    <AutocompleteItem {bunch of options}/>
  </Autocomplete>
</ScrollView>

When I focus on the Autocomplete and then tap one of the AutocompleteItems, the keyboard is dismissed instead of selecting the AutocompleteItem. I have to tap again in order for it to be selected, which is poor user experience. What I want is for tapping one of the AutocompleteItems to select it, with or without hiding the keyboard in the process.

After experimenting, I found that if I didn't have any AutocompleteItems, then the keyboard stops hiding. Thus, I figured that the problem was the AutocompleteItem element. I tried surrounding it with another ScrollView, which didn't work.

4

0 回答 0