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.
[v2][ios11, ios12] Add searchBar option for topBar (#3303)
* [ios11+] Add searchBar option for topBar
* Fix formatting and linter issues
* Add docs about topBar.searchBar
* Fix missing semicolons
* Revert prettier changes
* Add js tests for onSearchBarUpdated to achieve 100% coverage
* Mark searchBar test as :ios: specific
* V2: Peek and pop
* Add event when preview is dismissed in non commit mode
* tslint
* Refactor playground. Document preview api
* Added width prop
* Implement hybrid push/preview button
* Fixing small linting errors
[Experimental] Custom transition animation for ios (#1955)
* screen Background Color iOS
* ios v2 topBarTextFontFamily
* added topBarHidden to iOS
* minor fix and topBarHideOnScroll
* minor fix
* topBarButtonColor iOS
* topBarTranslucent iOS
* topBarTranslucent IOS minor fixes
* eslint fixes
* minor fixes
* changed setTabBadge to tabBadge and added a unit test in iOS
* added fontSize on iOS
* minor fix
* topBarTransparent
* minor fix
* first dirty custom transition iOS poc. in need of complete refactor and testing
* dirty poc for view transition
* dirty poc of interactive transition
* deleted unNeeded Files
* cleaning
* cleaning, support for interactiveImagePop and backButton custom transition
* cleaning
* merge v2 into custom-transition-animation fix
* merge fix
* merge fix
* cleaning and merge fix
* support for multiple animation in parralel, animations with are not shared element including: velocity, spring, alpha and translate
* last commit should also include these
* added resize mode animation and fixed flickering bug
* refactoring
* first cleaning and another test
* cleaning
* commandsHandler now accepts bridge in constructor, fixed tests, added e2e test
* eslint
* android pop now recieves two parameters - preparation for custom transition
* Refactor + add afterLoad to modal
* merge v2 second try
* merge fix
* merge fix
* fix ios unit tests
* fixed topBarTransparent e2e
* fix js tests
* refactored RNNAnimator, RNNAnimatedView, small fixes
* refactor topBarLargeTitle
* fixed lifycycle bug with componentWillUnmount, small fixes
* fix transparent conflict
* removered Element.js from coverage report
* comment redundent test
(still needs to be discussed), small fix
* removed commented test, moved element.js to adapters
changed setOptions to receive RNNNavigationOptions and added topBarTextColor (#1616)
* created RNNNavigationOptions
* created RNNRootViewControllerTest and added a test for the topBarBackgroundColor style
* working
* process navigationOptions colors
* created a test for new RNNRootViewController functionality
* changed RNNRootViewController to init with name, navigationOptions and container id, instead of node
* changed RNNRootViewController to get a new type - RNNavigationOptions
* refactored statusBarHidden test and implementation, all tests pass
* added setup to RNNRootViewControllerTest.m and refactored tests
* added test for title and implemented static title
* minor fixes
* removed redundant eslint config
* added topBarTextColor to RNNNavigationOptions
* topBarTextColor RNNRootViewController test
* changed setOptions to receive RNNNavigationOptions. created OptionsProcessor to process colors in both layoutTreeCrawler and Commands
* minor fix
* create setOptionsDynamically in RNNNavigationOptions to make dynamic options merge with static option instead of overriding them
* findcontainerId returns a RNNRootViewController , setOptions now merges styles with the static styles of the view
* created RNNNavigationOptions
* created RNNRootViewControllerTest and added a test for the topBarBackgroundColor style
* working
* process navigationOptions colors
* created a test for new RNNRootViewController functionality
* changed RNNRootViewController to init with name, navigationOptions and container id, instead of node
* changed RNNRootViewController to get a new type - RNNavigationOptions
* refactored statusBarHidden test and implementation, all tests pass
* added setup to RNNRootViewControllerTest.m and refactored tests
* added test for title and implemented static title
* minor fixes
* removed redundant eslint config