aksonov / react-native-router-flux

The first declarative React Native router
MIT License
8.99k stars 2.11k forks source link

how to hide scene tabs in tabs #3788

Closed tanz98 closed 3 years ago

tanz98 commented 3 years ago

hello, i need to show the tab in some page but i just want to show only 4 tabs

this is my code :

...
  <Tabs key="home" tabs={true} hideNavBar={true} tabBarStyle={isDarkMode ? styles.navbar : styles.navbar_light} tabStyle={{ padding: 5 }} titleStyle={{ fontSize: 10 }} initial={true} type="replace" >
      <Scene key="menu" component={Home} title="Home" />
      <Scene key="product" component={Product}  />
      <Scene key="transaction" component={Transaction} />
      <Scene key="profiles" component={Profile} title="Akun" />
      <Scene key="profileamounttransaction" component={ProfileAmountTransaction} hideTabBar /> // i need show tabs in this page but only 4 tabs home,product,transaction & profile
  </Tabs>
...

i already try using hideTabBar but it not hide the bar, i try anotherway like this Actions.profileamounttransaction({key:"profileamounttransaction", hideTabBar: true }) but the output was hide all the bar

i already prepare for alternation ways, i will make own tab bar but i lazy to make two ways but the output was same :(

please help thank you :)

tanz98 commented 3 years ago

finally i found the solutions, just put tabs again & set initial true in scene profileamount. Sorry for my bad :)