-
Notifications
You must be signed in to change notification settings - Fork 36
navigation.goBack(null) and fix SearchBar cancelButtonText #7
base: master
Are you sure you want to change the base?
Conversation
alangumer
commented
Oct 22, 2019
•
edited
Loading
edited
- 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.
HeaderBackButton has been moved to react-navigation-stack
There was a problem hiding this 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
src/SearchBar.ios.js
Outdated
@@ -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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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().
i think at this point this library needs to be updated for react-navigation v5 now :) |
@brentvatne yeah :), I'm planning to do that next week. |
|