react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.59k stars 5.04k forks source link

[ANDROID] Can't scroll in SectionList with react-native-gesture-handler v2 #10772

Open DanijelBojcic opened 2 years ago

DanijelBojcic commented 2 years ago

Current behavior

When gestureEnabled:true scroll doesn't work inside a SectionList. The underlying PanGestureHandler here takes the event from the SectionList. This behaviour happens only with react-native-gesture-handler v2. I can confirm that using v1, everything works as expected.

RN Gesture Handler v2

https://user-images.githubusercontent.com/50402950/185612116-b755cdfc-9d39-4571-9d7f-bb48a182c45d.mov

Expected behavior

PanGestureHandler should not take the scroll from the SectionList.

RN Gesture Handler v

https://user-images.githubusercontent.com/50402950/185612166-86e800ed-d359-4990-ba29-a3503afc74cd.mov

Reproduction

https://github.com/DanijelBojcic/NavigationScrollBug

Platform

Packages

Environment

package version
@react-navigation/native 6.0.11
@react-navigation/stack 6.2.2
react-native-safe-area-context 4.3.1
react-native-screens 3.16.0
react-native-gesture-handler 2.5.0
react-native 0.69.4
node 16.16.0
yarn 1.22.10
DanijelBojcic commented 2 years ago

I'm able to scroll when I add activeOffsetX={[-10,10]} to the PanGestureHandler here , but it sometimes flicker/jumps strangely, so its just a workaround.

elkinjosetm commented 1 year ago

Any update on this issue?

xwartz commented 1 year ago

I have the same issue, is there any solution?

ngandhy commented 1 year ago

Bump. Any updates or thoughts? Reproducing on Android 9 (api28)

xuanmai-agilityio commented 10 months ago

Got the same issue. So I have to use the FlatList from react-native-gesture-handler in order to scroll. But it does not trigger close the modal when scroll offset to 0.

pandya293 commented 8 months ago

In my case I have remove {flex: 1} from contentContainerStyle attribute on SectionList, and now scrolling is work perfect.