Skip to content

Commit

Permalink
allow to hide back button by providing left={()=>null}
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavlo Aksonov committed Sep 13, 2018
1 parent 8d86709 commit 14269ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/navigationStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,14 @@ function createNavigationOptions(params) {
|| navigationParams.backTitle
|| ((drawerImage || drawerIcon) && !hideDrawerButton && drawerPosition !== 'right')
) {
res.headerLeft = getValue(navigationParams.left || navigationParams.leftButton || params.renderLeftButton, { ...params, ...navigationParams, ...screenProps })
const leftButton = navigationParams.left || navigationParams.leftButton || params.renderLeftButton;
res.headerLeft = getValue(leftButton, { ...params, ...navigationParams, ...screenProps })
|| (((onLeft && (leftTitle || navigationParams.leftTitle || leftButtonImage || navigationParams.leftButtonImage)) || drawerImage || drawerIcon) && (
<LeftNavBarButton {...params} {...navigationParams} {...componentData} />
))
|| res.headerLeft
|| (init ? null : (renderBackButton && renderBackButton(state)) || <BackNavBarButton {...state} />);
|| (init ? null : (!leftButton && renderBackButton && renderBackButton(state)) || (!leftButton && <BackNavBarButton {...state} />))
|| null;
}

if (back) {
Expand Down

0 comments on commit 14269ff

Please sign in to comment.