-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Swipe / scroll actions on Flatlist gets registered as click event #47151
Copy link
Copy link
Open
Labels
Component: FlatListIssue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
Component: FlatListIssue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
Description
I have a my page like this :
{children}Sometimes while user scrolls /swipes to. go back. the click event gets triggered( navigating to a screen)
I read few issues , the only solution i got so far is to track the scroll with handlePressIn & handlePressOut , then calculate the pageX,pageY difference do decide whether its a drag or click action.
Adding this affects my scroll performance , (large list of products).
Any solution to this, without compromising the app performance?
Steps to reproduce
n/a
React Native Version
0.75.4
Affected Platforms
Runtime - iOS
Output of
npx react-native infoStacktrace or Logs
Reproducer
snack.expo.dev/@srimarajexpo/delicious-violet-ramen
Screenshots and Videos
No response