Skip to content

Commit

Permalink
Bind ExRouteAdapter instance to render callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
axelander committed Feb 24, 2016
1 parent 752dde2 commit 91eb627
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ExRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export class ExRouteAdapter {
this.props = props || {};
this.renderScene = this.renderScene.bind(this);
if (this.route.props.renderRightButton){
this.renderRightButton = this.route.props.renderRightButton.bind(this.route);
this.renderRightButton = this.route.props.renderRightButton.bind(this);
}
if (this.route.props.renderTitle){
this.renderTitle = this.route.props.renderTitle.bind(this.route);
this.renderTitle = this.route.props.renderTitle.bind(null, this.route);
}
if (this.route.props.renderLeftButton){
this.renderLeftButton = this.route.props.renderLeftButton.bind(this.route);
this.renderLeftButton = this.route.props.renderLeftButton.bind(this);
}
}

Expand Down Expand Up @@ -104,7 +104,7 @@ export class ExRouteAdapter {
style={[ExNavigator.Styles.barLeftButtonText, this.route.props.leftButtonTextStyle]}>{this.route.props.leftTitle}</Text>
</TouchableOpacity>);
}

if (index === 0 || index < navigator.getCurrentRoutes().length-1) {
return null;
}
Expand Down

0 comments on commit 91eb627

Please sign in to comment.