callstack / callstack/react-native-pager-view
Any way to disable onPress on child views while swiping?
- Dominant language
- TypeScript
- Stars
- 3.4k
- Forks
- 476
- Avg merge
- 10d 21h
- Merged PRs (30d)
- 2
Description
I have an issue where onPress gets triggered on child views while I'm swiping in the pager view. Is there some way to prevent this from happening?
I tried tracking the pager state with the events:
```
{
setPageScrolling(e.nativeEvent.pageScrollState != "idle");
console.log("page scrolling", e.nativeEvent.pageScrollState != "idle");
};
const onMoveShouldSetResponderCapture = (e) => {
return pageScrolling;
};
const onPageScroll = (e) => {
console.log("scrolling");
setPageScrolling(true);
};
```
I'm using version 5.4.9 and Expo Go.
Contributor guide
Assessment
This issue has not been assessed yet.