Summary: This adds a new event `onSearchBarCancelPressed` that fires
when the user presses the cancel button on the search bar in the
navigation bar. `onSearchBarUpdated` does indirectly fire when the user
presses cancel, as the query will be reset to an empty string, but it is
not possible to distinguish those events from the user simply resetting
the query. My use case for this is to have a view that appears on top of
the normal content of the view controller when the search bar is
focused.
Test Plan: ran `npm run test-js` and confirmed added JS unit tests
passed.
I also tested this with my app, and confirmed the
`onSearchBarCancelPressed` method was called when I pressed the cancel
button.
Add MainReactPackage only if wasn't added by the user
RNN's ReactNativeHost implementation prevented users from adding MainReactPackage
themselves, this forced users that wanted to use a custom MainReactPackage to extend
NavigationReactNativeHost which is a bit of an overkill for this simple use case.
Change BottomTabs visibility to Invisible instead of Gone
This change is introduced so BottomTabs are actually rendered when created
This commit also fixes back button issue where it wasn't properly added when pushing screens.
* Refactored backButton api
* Move StackController to separate package
Implement BackButtonOptions
* Somewhat simplify StackController creation in tests
* Pull backButton logic from StackController
* Handle all TopBar button options in TopBarButtons
* fix back button on iOS
* Migrate to jest to support parallel ios simulator from detox
* When e2e lint only ts or js files
* Remove mocha from deps and decrease from 480000ms to 180000ms