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
Allow for renderTitle to be passed through
Fixes #61
  • Loading branch information
zebulgar committed Dec 14, 2015
commit b1d948476620cdc834f6b9f48290671d42df1635
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