-
-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swipe gesture registered as tap when using in a React Navigation screen #372
Comments
Getting porfomance issue while switching between react-navigation-button-tabs. Might be helpful solution - shouldComponentUpdate() |
Temporary solution: In ticket #150 someone suggested using TouchableOpacity from react-native-gesture-handler but that doesn't work for me (I find it barely usable and I don't want the opacity effect) My temporary workaround is by using BaseButton component from react-native-gesture-handler, it is somewhat similar to pressable and can be styled like any other react native components I suspect that the gesture handler system in React Navigation is conflicting with Carousel's. But in my understanding React Navigation itself uses RNGH to handle gestures. So I don't know what actually happened here. |
I also solved this issue by using TapGestureHandler component for the pressable component from 'react-native-gesture-handler' instead of using TouchableOpacity |
Using |
@Vahan-Asryan the issue with touchableWithoutFeedback, is that you're unable to wrap a pressable that's inside it |
When a |
This issue is quite similar to ticket #150
I've double checked and firmly believe there're some problem with the package.
System: MacOS, Macbook M2
This is my package.json
I have a carousel component with two renderItem, each item is a Pressable component.
the problem is, when I swipe the carousel, it automatically registered as tap and triggered onPress function inside Pressable.
Something strange
the issue only happens on iOS
When using in newly created project (without React Navigation), everything works fine. Swipe gesture works absolutely normal. But if using in newly created project with React Navigation ( the Carousel component is inside a React Navigation screen ), when swiping the carousel doesn't work normally instead it treat my swipe gesture as a tap gesture and triggered onPress function in my Pressable item.
I've wrapped the base view component with GestureHandlerRootView component.
Anyone has idea?
The text was updated successfully, but these errors were encountered: