From 5c6f76ce1eb4b6e82565f367142cf78a33604d91 Mon Sep 17 00:00:00 2001 From: Lane Rettig Date: Tue, 12 Jan 2016 15:51:31 -0500 Subject: [PATCH] add onLeft and leftTitle to match onRight, rightTitle --- ExRouter.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ExRouter.js b/ExRouter.js index 5a1ebaf66..511f513c8 100644 --- a/ExRouter.js +++ b/ExRouter.js @@ -86,6 +86,16 @@ export class ExRouteAdapter { } renderLeftButton(navigator, index, state){ + if (this.route.props.onLeft && this.route.props.leftTitle) { + return ( this.route.props.onLeft({...this.route.props, ...this.props})} + style={[ExNavigator.Styles.barLeftButton, this.route.props.leftButtonStyle]}> + {this.route.props.leftTitle} + ); + } + if (index === 0 || index < navigator.getCurrentRoutes().length-1) { return null; }