Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I show tab inside the tab (Nested tabs)? #2199

Closed
nakulkundaliya opened this issue Aug 8, 2017 · 11 comments
Closed

How can I show tab inside the tab (Nested tabs)? #2199

nakulkundaliya opened this issue Aug 8, 2017 · 11 comments

Comments

@nakulkundaliya
Copy link

How can I show tab inside the tab?

Example
g1zny

@aksonov
Copy link
Owner

aksonov commented Aug 8, 2017 via email

@nakulkundaliya
Copy link
Author

Yes i have tried it

@aksonov
Copy link
Owner

aksonov commented Aug 8, 2017

And what do you see? Probably react-navigation doesn't support it, please try pure react-navigation solution first.

@nakulkundaliya
Copy link
Author

You mean it's not possible in react-native-router-flux

@aksonov
Copy link
Owner

aksonov commented Aug 8, 2017

@nakulkundaliya If react-navigation doesn't support it then yes. But it seems to support it with some lazy and gestureEnabled tweaking:
react-navigation/react-navigation#662

@nakulkundaliya
Copy link
Author

@aksonov I fixed it
I forgot to removed component from the root tab
That's why sub tabs are not showing.
Thanks

@tasharofi
Copy link

@aksonov can you please share sample code block on how to do the nested tabs here? I am also looking to do the similar thing. Would be great if you can do that. thanks

@nakulkundaliya
Copy link
Author

@tasharofi
Copy link

@nakulkundaliya thanks but I dont see the nested tabs section? I am running the "Example" project. Can you tell me where to find it please?

@nakulkundaliya
Copy link
Author

<Scene
  key="tab1"
  title="Tab #1"
  tabBarLabel="TAB #1"
  icon={TabIcon}
  navigationBarStyle={{backgroundColor: 'red'}}
  titleStyle={{color: 'white', alignSelf: 'center'}}
>
  <Scene
    key="tab1_1"
    component={TabView}
    title="Tab #1_1"
    onRight={() => alert('Right button')}
    rightTitle="Right"
  />
  <Scene
    key="tab1_2"
    component={TabView}
    title="Tab #1_2"
    back
    titleStyle={{color: 'black', alignSelf: 'center'}}
  />
</Scene>
<Scene key="tab2" initial title="Tab #2" icon={TabIcon}>
  <Scene
    key="tab2_1"
    component={TabView}
    title="Tab #2_1"
    renderRightButton={() => <Text>Right</Text>}
  />
  <Scene
    key="tab2_2"
    component={TabView}
    title="Tab #2_2"
    back
    onBack={() => alert('onBack button!')}
    backTitle="Back!"
    panHandlers={null}
  />
</Scene>

@mayur10
Copy link

mayur10 commented Nov 20, 2019

How can hide parent tab bar if i click on a particular child tab bar.
For eg: with reference to the picture posted in the question.
I want to show VIEW P1,VIEW P2,VIEW P3 only in view 1 and want to hide the parent tab in view 2.
Is this possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants