react-native-modal-dropdown
react-native-modal-dropdown copied to clipboard
User needs to tap twice on dropdown
hi, we've found in the app that when the dropdown is displayed - the user then needs to tap twice (minimally) for the tap gesture to be recognised. Are there any suggestions on how we can fix this?
Do you render the option row yourself or use the default render.
+1 This is what I thought disabling the fade-in animation would fix
We really need this fixed as soon as possible. I'll give animated=false a try today in mean time
@ajonno Still an issue when animation closed?
let me double check stay tuned..
my tests on device seem to indicate that animated={false}
makes taps work on first try. there's a slight lag but certainly first tap works
unf. this is still a problem and we had to backlog it. picked it up again now and trying to resolve. setting animation=false isnt making any difference re our tests on device. we can confirm that it is specifically 2 taps.
(we are using a bound function on renderRow= .. )
1st tap does nothing, 2nd tap is recognised.
ok have figured it out. For our use case, we need to have keyboardShoudPersistTaps="always"
. This ensures, that the first tap on a row in the (react-native-modal-dropdown) ListView is recognised and handled. We'll submit a change/pull request shortly, greatly appreciate if you can review asap and merge. Thanks!
@ajonno Great. I'm ready and thank you.
my pleasure! i just tried a fresh install via yarn (yarn add react-native-modal-dropdown
) but the change isn't there. do you need to bump the version number to 0.4.4 ?
Has this been fixed and released? https://www.npmjs.com/package/react-native-modal-dropdown lists 0.4.3
as latest
@ajonno @DanAndreasson Available now via npm.
brilliant many thanks
Close the issue?
Hi, i'm not sure whether it's the same problem, but i have a page with multiple dropdowns, and if one of them is expanded i have to tap twice to open another one, first tap will close the current dropdown, second will expand the other one. I'm using the default renderRow, tried both animated={false} and keyboardShouldPersistTaps="always"
It is still happening to me with 0.5.0.
It is still happening to me!
@Werewolve Could you possibly be trying to access the dropdown after clicking a textInput (or triggering the keyboard somehow)? this was the cause of the problem for me.
@Dror-Bar there is no textInput on the screen. I have three dropdowns on the screen, maybe that cause the problem. After selecting the index that I store in the state is the old one, after selecting again the index ist correct.
@Dror-Bar
Hey, I am having the issue with having to double click and the dropdown is in a textInput, same as you. How did you fix it?
Thanks
Passing keyboardShoudPersistTaps="always"
in ModalDropdown
component works for me
Passing
keyboardShoudPersistTaps="always"
inModalDropdown
component works for me
(keyboardShou" l "dPersistTaps="always") - don't miss a letter "l"!!!