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