Open costea93 opened 2 years ago
We have a similar problem. We click on the down arrow, and then have to press the item twice to select the item. Does anyone have a workaround or solution?
I was playing with the code from this example, https://github.dev/onmotion/react-native-autocomplete-dropdown/blob/main/example/components/RemoteDataSetExample3.js The following code works for me. I just blur the text input when the suggestionList is opened. I tested in my proj.
const onOpenSuggestionsList = useCallback((isOpened) => {
if (isOpened) {
searchRef.current.blur();
}
}, [])
Hi guys! what platform is the issue on? I can't reproduce it
I am seeing this as well on iOS, but only when renderItem is set (for me I just used a Text with padding applied) edit: seems like I see it happening even without it set, as mentioned above the first click blurs the input, then you have to click again to actually select a dropdown item
For me this problem was arising because of using this component inside scrollview. Setting keyboardShouldPersistTaps="always" on ScrollView fixes this problem for me on Android. Not tested on IOS.
I am facing same issue on iOS. It works fine on Android and iOS.
For me onSelectItem
function is called but the selected value shown in the input field is the value I typed not the value I selected.
Tried the solutions here: https://github.com/onmotion/react-native-autocomplete-dropdown/issues/62 but does not solve the problem. Attaching a screen recording for reference:
Can someone help fixing this issue?
I have the same issue, but I just found out, that it's only when you type text via your hardware keyboard (?!).
If you enable Software keyboard in iOS simulator and you click on letters there, then Autocomplete works as expected... Simulator menu -> I/O -> Keyboard -> Toggle Software Keyboard
Still happening for me even if I use software keyboard:
Hi, as i see at the moment, we need to press twice to select item and close the dropdown. I guess this happens because we are focused in the input. Is there a way to avoid this, and select the item and close dropdown from 1 press?