Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix to show correctly show navbar in tabs component
  • Loading branch information
philipshurpik committed Mar 28, 2016
commit 20383ce8f4c69c64cded1263628d1b0658ebd7b9
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