Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navigation.goBack(null) and fix SearchBar cancelButtonText #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

alangumer
Copy link

@alangumer alangumer commented Oct 22, 2019

  • 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.
  • Fix SearchBar cancelButtonText.
  • Fix HeaderBackButton import

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.
@alangumer alangumer changed the title navigation.goBack(null) navigation.goBack(null) and fix SearchBar cancelButtonText Oct 22, 2019
HeaderBackButton has been moved to react-navigation-stack
Copy link
Member

@brentvatne brentvatne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you can revert the thing i mentioned then otherwise this is good

@@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should probably just let the user override it with onCancelPress rather than default to goBack(null) here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted goBack(null) to goBack().

@brentvatne
Copy link
Member

i think at this point this library needs to be updated for react-navigation v5 now :)

@eriveltonelias
Copy link
Member

@brentvatne yeah :), I'm planning to do that next week.

@armenio
Copy link
Contributor

armenio commented Nov 17, 2020

i think at this point this library needs to be updated for react-navigation v5 now :)

#20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants