akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.3k stars 952 forks source link

Autocomplete onSelect #1368

Closed Charles22219 closed 3 years ago

Charles22219 commented 3 years ago

🐛 Bug Report

When selecting an option I have to press twice to actually select something, the first press doesn't run the onSelect, it just removes the focus on the textinput and lowers the keyboard.

Im using the Autocomplete Accessories example in the docs Although it works on the showcase, the copy pasted code doesn't work in my project

To Reproduce

  1. type query
  2. press on an option
  3. *focus is textinput is removed, keyboard closes, but option is not selected.
  4. press on an option
  5. *option is selected and onSelect runs

Expected behavior

first press on an option should select it right away like the example in the docs

UI Kitten and Eva version

Package Version
@eva-design/eva v2.0.0
@ui-kitten/components v5.0.0
Charles22219 commented 3 years ago

I think its similar to this https://stackoverflow.com/questions/49284127/react-native-two-taps-required-for-onpress-to-work since the options is a scrollview

But I dont know where to put keyboardShouldPersistTaps="always" i tried in Autocomplete and AutocompleteItem but it doesnt work

Charles22219 commented 3 years ago

same issue with #1122