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.28k forks source link

clicking on the back button it does not remain in the tab #1140

Open AlexCernik opened 3 years ago

AlexCernik commented 3 years ago

Hello, I have a problem, I am using react navigation stack, when selecting the detail of an article and clicking on the back button it does not remain in the tab but returns to the first one. Thank you

Steps to Reproduce

AppStack

const AppScn = () => (
    <TabBar navigation={navigation} />
  );
<Stack.Screen name='MyRuby' component={AppScn}
          options={{
            headerTitle: <Header navigation={navigation} title='Noticias' />
          }}
        />

TabBar

<ScrollableTabView
        scrollWithoutAnimation={true}
        tabBarActiveTextColor={'white'}
        tabBarInactiveTextColor={'grey'}
        tabBarUnderlineStyle={{ borderWidth: 0, backgroundColor: '#ce3d3a' }}
        renderTabBar={() => (<ScrollableTabBar />)}
      >
       {
          list.map((item) => (
            <View key={item.id} tabLabel={item.name}>
              <AppScreen navigation={navigation} id={item.id} />
            </View>
          ))
        }
</ScrollableTabView>

Thanks