-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
When using Pressable inside a horizontal carousel, the scroll is registered as a tap #150
Comments
Can you show me a video, I can't imagine what it looks like |
recording.mp4When pressing to scroll sideways, the pressable is also triggered and navigates to the content of the card |
hmm... show me your code? |
Does that happen if you run my demo code(In homepage)? |
Hi @diego-paired and @dohooo, The Component under modal
The carousel item component
My package json
I hope this will help you ! |
Could you give me an REPO or EXPO link? It'll make it easier for me to deal with your problem. |
Hi again, sorry for the late answer i found the solution ! In my case it's because of the modal, explanation just below:
Hope this will help someone maybe ! |
Maybe try to add gestureHandlerRootHOC on your component and use TouchOpacity from react-native-gesture-handler inside your carousel item. About the warning i don't know exactly what is it, but after some research it seems to be nothing important. In my case i remove the warning message by downgrading to "react-native-gesture-handler": "2.1.1". but keep in mind that this is only a warning. If you use react navigation library, it's maybe because of @react-navigation/stack using old api version. Now they use native stack @react-navigation/native-stack |
@diego-paired @halaxysounds I have reproduced your problem. I used the same version. @diego-paired
Can you give it a try and let me know the result? I believe this is solvable, because most people haven't talked to me about this kind of problem, and they've obviously used the solution here. |
When I changed to TouchableOpacity of rn.mov |
Is there an answer for this that does not use Does |
What's your mean? If you have any other questions. I suggest you create a new issue. |
The |
Sry I don't know. Maybe you can create a discussion for this question. |
Infact I don’t think it related to this library, and I think you can find some inspiration from documentation in react-native-gesture-handler library. |
Hey there, thanks for this amazing library. I am still facing this issue |
Thank you! You save my life 😆 |
I'm using the Carousel in its default mode horizontally scrolling.
When the items rendered use Pressable and the user scrolls horizontally, the scroll happens but a press is also registered when lifting the finger.
If I swap Pressable for a Gesture Handler Touchable, the error disappears.
Please advise, thank you.
The text was updated successfully, but these errors were encountered: