diff --git a/index.js b/index.js index c0b4d1030..8dcad8f36 100644 --- a/index.js +++ b/index.js @@ -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"); @@ -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); }