Skip to content

Commit

Permalink
Merge pull request #70 from nightingale/master
Browse files Browse the repository at this point in the history
Allow for renderTitle to be passed through
  • Loading branch information
Pavlo Aksonov committed Dec 15, 2015
2 parents 761cce1 + b1d9484 commit 19c6123
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class ExRoute {
}
const schema = schemas ? schemas[props.schema || 'default'] || {} : {};
const {name, type, title, hideNavBar, navigationBarStyle, backButtonStyle, rightButtonStyle, rightButtonTextStyle,
onEnter, onLeave, wrapRouter, sceneConfig, renderLeftButton,
onEnter, onLeave, wrapRouter, sceneConfig, renderLeftButton, renderTitle,
onRight, rightTitle, header, renderRightButton, renderBackButton, footer, component, children} = {...schema, ...props};
if (!component && !children) {
throw new Error("Component class or scene instance (child) should be passed");
Expand Down Expand Up @@ -299,6 +299,9 @@ class ExRoute {
if (renderLeftButton){
this.renderLeftButton = renderLeftButton.bind(this, this);
}
if (renderTitle){
this.renderTitle = renderTitle.bind(this, this);
}
this.leaf = this.component && !(this.getType() === 'switch' || this.wrapRouter);
}

Expand Down

0 comments on commit 19c6123

Please sign in to comment.