Releases: drash-course/react-navigation
Releases · drash-course/react-navigation
Hideable tabs with BACK action consumption fix for TabRouter
hidden-tabs-backfix fixed BACK action consumption when TabRouter is not back eligible
Merged upstream v1.5.0
Merged upstream v1.5.0 release into the feature branch
Feat hideable tabs in TabBar
In this fork of react-navigation (1.0.0-beta.27), tabs created in a TabNavigator can now be hidden from the TabBar by setting the { hiddenTabs: ['MyTab'] } config.
To hide a tab by default, you can write:
const tabNav = TabNavigator({
FirstTab: { screen: firstScreen },
SomeTab: { screen: secondScreen },
}, {
hiddenTabs: ['SomeTab']
});
Hidden tabs can be made visible again by dispatching the showTab
action, like so:
this.props.navigation.dispatch(
NavigationActions.showTab({ tabRouteName: 'SomeTab' })
);
Tabs can also be hidden programatically with the hideTab
action:
this.props.navigation.dispatch(
NavigationActions.hideTab({ tabRouteName: 'SomeTab' })
);