From 721cea9d313baba044910add0c379979d127157f Mon Sep 17 00:00:00 2001 From: Henry Orozco Date: Tue, 22 Oct 2019 15:31:30 -0400 Subject: [PATCH 1/4] navigation.goBack(null) Add null parameter, If null parameter is not present it won't go back when the Search Screen is a part of a top-level Navigator. --- src/SearchBar.ios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SearchBar.ios.js b/src/SearchBar.ios.js index 13472a4..6d1607b 100644 --- a/src/SearchBar.ios.js +++ b/src/SearchBar.ios.js @@ -178,7 +178,7 @@ export default class SearchBar extends React.PureComponent { if (this.props.onCancelPress) { this.props.onCancelPress(this.props.navigation.goBack); } else { - this.props.navigation.goBack(); + this.props.navigation.goBack(null); } }; } From 5c7be4b74cf264a1ab338169501fe5b7009eb020 Mon Sep 17 00:00:00 2001 From: Henry Orozco Date: Tue, 22 Oct 2019 15:42:03 -0400 Subject: [PATCH 2/4] Fix SearchBar cancelButtonText --- src/SearchLayout.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SearchLayout.js b/src/SearchLayout.js index a0be087..9d882da 100644 --- a/src/SearchLayout.js +++ b/src/SearchLayout.js @@ -50,6 +50,7 @@ export default class SearchLayout extends React.Component { tintColor={ this.props.searchInputTintColor || this.props.headerTintColor } + cancelButtonText={this.props.cancelButtonText} /> From b89b1706225a0637c8bfb4e17dc2fed8e214304b Mon Sep 17 00:00:00 2001 From: Henry Orozco Date: Wed, 23 Oct 2019 14:37:24 -0400 Subject: [PATCH 3/4] Fix HeaderBackButton import HeaderBackButton has been moved to react-navigation-stack --- src/Header.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Header.js b/src/Header.js index a6ab955..760c91b 100644 --- a/src/Header.js +++ b/src/Header.js @@ -7,7 +7,8 @@ import { StyleSheet, View, } from 'react-native'; -import { withNavigation, HeaderBackButton } from 'react-navigation'; +import { withNavigation } from 'react-navigation'; +import { HeaderBackButton } from 'react-navigation-stack'; import { getInset, getStatusBarHeight } from 'react-native-safe-area-view'; import { isIphoneX } from 'react-native-iphone-x-helper'; From 2d5d1193facfebd9c3f2823dd89b523cae50a1ad Mon Sep 17 00:00:00 2001 From: Henry Orozco Date: Fri, 5 Jun 2020 19:31:36 -0400 Subject: [PATCH 4/4] revert goBack(null) to goBack() --- src/SearchBar.ios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SearchBar.ios.js b/src/SearchBar.ios.js index 6d1607b..13472a4 100644 --- a/src/SearchBar.ios.js +++ b/src/SearchBar.ios.js @@ -178,7 +178,7 @@ export default class SearchBar extends React.PureComponent { if (this.props.onCancelPress) { this.props.onCancelPress(this.props.navigation.goBack); } else { - this.props.navigation.goBack(null); + this.props.navigation.goBack(); } }; }