react-native-modal-dropdown icon indicating copy to clipboard operation
react-native-modal-dropdown copied to clipboard

User needs to tap twice on dropdown

Open ajonno opened this issue 7 years ago • 22 comments

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?

ajonno avatar Mar 08 '17 00:03 ajonno

Do you render the option row yourself or use the default render.

sohobloo avatar Mar 15 '17 03:03 sohobloo

+1 This is what I thought disabling the fade-in animation would fix

ARMATAV avatar Mar 23 '17 00:03 ARMATAV

We really need this fixed as soon as possible. I'll give animated=false a try today in mean time

ajonno avatar Mar 23 '17 20:03 ajonno

@ajonno Still an issue when animation closed?

sohobloo avatar Mar 29 '17 06:03 sohobloo

let me double check stay tuned..

ajonno avatar Mar 29 '17 08:03 ajonno

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

ajonno avatar Mar 31 '17 07:03 ajonno

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.

ajonno avatar Jun 17 '17 05:06 ajonno

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 avatar Jun 17 '17 07:06 ajonno

@ajonno Great. I'm ready and thank you.

sohobloo avatar Jun 17 '17 07:06 sohobloo

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 ?

ajonno avatar Jun 20 '17 11:06 ajonno

Has this been fixed and released? https://www.npmjs.com/package/react-native-modal-dropdown lists 0.4.3 as latest

DanAndreasson avatar Jun 21 '17 15:06 DanAndreasson

@ajonno @DanAndreasson Available now via npm.

sohobloo avatar Jun 22 '17 02:06 sohobloo

brilliant many thanks

ajonno avatar Jun 22 '17 03:06 ajonno

Close the issue?

LuckyStubs avatar Oct 05 '17 13:10 LuckyStubs

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"

amirsc avatar Nov 06 '17 15:11 amirsc

It is still happening to me with 0.5.0.

ghost avatar Nov 12 '17 20:11 ghost

It is still happening to me!

Werewolve avatar Jan 02 '18 08:01 Werewolve

@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 avatar Jan 03 '18 14:01 Dror-Bar

@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.

Werewolve avatar Jan 03 '18 14:01 Werewolve

@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

jim-at-jibba avatar Feb 22 '18 12:02 jim-at-jibba

Passing keyboardShoudPersistTaps="always" in ModalDropdown component works for me

ravirupareliya avatar Dec 19 '18 13:12 ravirupareliya

Passing keyboardShoudPersistTaps="always" in ModalDropdown component works for me

(keyboardShou" l "dPersistTaps="always") - don't miss a letter "l"!!!

Yaolegol avatar Jan 29 '20 11:01 Yaolegol