mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 17:18:09 +00:00
Make tabBar visible when no config is gived. Fixes #239
This commit is contained in:
parent
8e8c4fb9a1
commit
797833a69a
@ -88,11 +88,10 @@ class TabView extends PureComponent<void, Props, void> {
|
||||
const tabBar = this.props.router.getScreenConfig(this.props.childNavigationProps[route.key], 'tabBar');
|
||||
if (tabBar && typeof tabBar.label !== 'undefined') {
|
||||
return tabBar.label;
|
||||
} else {
|
||||
const title = this.props.router.getScreenConfig(this.props.childNavigationProps[route.key], 'title');
|
||||
if (typeof title === 'string') {
|
||||
return title;
|
||||
}
|
||||
}
|
||||
const title = this.props.router.getScreenConfig(this.props.childNavigationProps[route.key], 'title');
|
||||
if (typeof title === 'string') {
|
||||
return title;
|
||||
}
|
||||
return route.routeName;
|
||||
};
|
||||
@ -160,7 +159,9 @@ class TabView extends PureComponent<void, Props, void> {
|
||||
const { state } = this.props.navigation;
|
||||
const tabBar = this.props.router.getScreenConfig(this.props.childNavigationProps[state.routes[state.index].key], 'tabBar');
|
||||
|
||||
if (tabBarComponent !== undefined && tabBar && tabBar.visible !== false) {
|
||||
const tabBarVisible = tabBar ? tabBar.visible !== false : true;
|
||||
|
||||
if (tabBarComponent !== undefined && tabBarVisible) {
|
||||
if (tabBarPosition === 'bottom') {
|
||||
renderFooter = this._renderTabBar;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user