ptomasroos / react-native-scrollable-tab-view

Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
https://www.npmjs.com/package/react-native-scrollable-tab-view
6.93k stars 2.29k forks source link

ScrollableTabView component in which I have buttons #1159

Open danielsledz opened 2 years ago

danielsledz commented 2 years ago

Hi, I have a ScrollableTabView component in which I have buttons. When sometimes I want to scroll to another tab I accidentally click the button that opens a new window. Is there any easy/sensible way to solve this problem? Interrupt the onPress function if the card changes or something similar?

ezgif com-gif-maker (1)

macashok81 commented 2 years ago

I was kind of facing similar issue. I had a Touchable Opacity in the Tab children and when swiping between Tabs, it would end up clicking the card. I solved it by

import {TouchableOpacity } from 'react-native-gesture-handler'.

Using it from the react native gesture handler solves it.