diff --git a/Example/Example.js b/Example/Example.js index 661d643dc..1cd3f7ee8 100644 --- a/Example/Example.js +++ b/Example/Example.js @@ -114,7 +114,7 @@ class Example extends Component { - {}} > + {}, + }); + } render() { const title = this.props.title || 'No Title'; const data = this.props.data || 'No Data'; diff --git a/src/Router.js b/src/Router.js index 274e7aa2a..c18c462c9 100644 --- a/src/Router.js +++ b/src/Router.js @@ -103,12 +103,15 @@ function createNavigationOptions(params) { res.tabBarIcon = tabBarIcon || icon; } - if ((rightButtonImage || rightTitle || params.renderRightButton) && onRight) { + if (rightButtonImage || rightTitle || params.renderRightButton || onRight || navigationParams.onRight + || navigationParams.rightTitle || navigationParams.rightButtonImage) { res.headerRight = getValue(navigationParams.right || right || rightButton || params.renderRightButton, { ...navigationParams, ...screenProps }) || renderRightButton({ ...params, ...navigationParams }); } - if (leftButtonImage || backButtonImage || backTitle || leftTitle || params.renderLeftButton || leftButtonTextStyle || backButtonTextStyle || onLeft) { + if (leftButtonImage || backButtonImage || backTitle || leftTitle || params.renderLeftButton || leftButtonTextStyle + || backButtonTextStyle || onLeft || navigationParams.leftTitle || navigationParams.onLeft || navigationParams.leftButtonImage + || navigationParams.backButtonImage || navigationParams.backTitle) { res.headerLeft = getValue(navigationParams.left || left || leftButton || params.renderLeftButton, { ...params, ...navigationParams, ...screenProps }) || renderLeftButton({ ...params, ...navigationParams }) || (init ? null : renderBackButton({ ...params, ...navigationParams, ...screenProps })); }