0

I have this material top tabs navigation in react native :

    <Tab.Navigator
      initialRouteName="Screen1"
      screenOptions={() => ({
        swipeEnabled: true,
      })}>
      <Tab.Screen name="Screen1" component={Screen1} />
      <Tab.Screen name="Screen2" component={Screen2} />
      <Tab.Screen name="Screen3" component={Screen3} />
    </Tab.Navigator>

i can navigate between these 3 screens by swiping left / right.The problem is, I have a horizontal ScrollView in Screen1, and when i swipe right on the ScrollView, sometimes it doesnt scroll through the ScrollView, but through the Tab Screens, and sometimes the ScrollView gets stuck in one place.

How can i make it so, when i scroll on the ScrollView, it ignores the swiper of the navigator, and only scrolls on the ScrollView?

P.S: im working only on android right now, so i dont know if this issue is only on android, or on both platforms.

I tried playing with NestedScrollEnabled prop of the ScrollView, I tried importing the ScrollView from 'react-native-gesture-handler', but none of them seems to be working.

dudi ftw
  • 1
  • 1
  • Not yet, but i noticed the scrollview doesnt stop randomly. It stops only in these scenarios : When i scroll to the end / beginning of the scrollview, then i scroll to navigate to screen 2. When i go back to screen 1 after this, the scrollview is locked, and i have to swipe slowly on the scrollview a few times to unlock it. Im trying to find a way to disable navigating when scrolling on scrollview at all, but i cant find a solution to that :/ – dudi ftw Mar 27 '23 at 20:14

0 Answers0