Skip to content

Commit

Permalink
Allow for renderTitle to be passed through
Browse files Browse the repository at this point in the history
  • Loading branch information
zebulgar committed Dec 14, 2015
1 parent 761cce1 commit b1d9484
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 b1d9484

Please sign in to comment.