Skip to content

Commit

Permalink
Merge pull request #418 from philipshurpik/fix-navbar-in-tabs
Browse files Browse the repository at this point in the history
fix to show correctly show navbar in tabs component
  • Loading branch information
aksonov committed Mar 28, 2016
2 parents 8acd239 + 20383ce commit bbb20bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default class NavBar extends React.Component {
}
render() {
const state = this.props.navigationState;
const child = state.children[state.index];
let selected = state.children[state.index];
while (selected.hasOwnProperty("children")) {
selected = selected.children[selected.index]
Expand All @@ -62,7 +63,7 @@ export default class NavBar extends React.Component {
if (selected.component && selected.component.renderNavigationBar){
return selected.component.renderNavigationBar({...this.props,...selected});
}
if (state.hideNavBar || selected.hideNavBar){
if (state.hideNavBar || child.hideNavBar || selected.hideNavBar){
return null;
}
return (
Expand Down

0 comments on commit bbb20bb

Please sign in to comment.