Skip to content

Commit

Permalink
more flexible navbar customization
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavlo Aksonov committed Mar 1, 2016
1 parent 36ffa9a commit 7d25ed2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class ExNavigationBar extends Navigator.NavigationBar {
}
render(){
const route = this.props.router.nextRoute || this.props.router.currentRoute;
const renderNavBar = (route.component && route.component.renderNavigationBar) || route.renderNavigationBar || this.props.renderNavigationBar;
const renderNavBar = (route.component && route.component.renderNavigationBar) || route.renderNavigationBar || this.props.router.renderNavigationBar || this.props.renderNavigationBar;
let res = renderNavBar ? renderNavBar(this.props) : super.render();

if (route.props.hideNavBar === false){
Expand Down Expand Up @@ -316,8 +316,8 @@ export default class ExRouter extends React.Component {
})}
style={styles.transparent}
sceneStyle={{ paddingTop: 0, backgroundColor:'transparent' }}
renderNavigationBar={props=><ExNavigationBar {...this.props} {...props} {...this.state} router={router}/>}
{...this.props}
renderNavigationBar={props=><ExNavigationBar {...this.props} {...props} {...this.state} router={router}/>}
/>
{footer}
{this.state.modal}
Expand Down

0 comments on commit 7d25ed2

Please sign in to comment.