|
|
|
|
87
|
|
87
|
|
88
|
The nativeEvent listener is used to track various events that originate in the native aspect of the app, primarily UI events.
|
88
|
The nativeEvent listener is used to track various events that originate in the native aspect of the app, primarily UI events.
|
89
|
|
89
|
|
90
|
-### `bottomTabSelected` event
|
|
|
|
|
90
|
+### bottomTabSelected event
|
91
|
This event is emitted whenever a BottomTab is selected by the user
|
91
|
This event is emitted whenever a BottomTab is selected by the user
|
|
|
92
|
+
|
92
|
|Parameter|Description|
|
93
|
|Parameter|Description|
|
93
|
-|:-:|:-|
|
|
|
|
|
94
|
+|:-:|:--|
|
94
|
|**name**|`bottomTabSelected`|
|
95
|
|**name**|`bottomTabSelected`|
|
95
|
|**params**|`unselectedTabIndex`: The index of the previously selected tab<br>`selectedTabIndex`: The index of the newly selected tab|
|
96
|
|**params**|`unselectedTabIndex`: The index of the previously selected tab<br>`selectedTabIndex`: The index of the newly selected tab|
|
96
|
|
97
|
|
97
|
-### `buttonPressed` event
|
|
|
|
|
98
|
+### buttonPressed event
|
98
|
This event is emitted whenever a TopBat button is pressed by the user
|
99
|
This event is emitted whenever a TopBat button is pressed by the user
|
|
|
100
|
+
|
99
|
|Parameter|Description|
|
101
|
|Parameter|Description|
|
100
|
-|:-:|:-|
|
|
|
|
|
102
|
+|:-:|:--|
|
101
|
|**name**|`buttonPressed`|
|
103
|
|**name**|`buttonPressed`|
|
102
|
|**params**|`componentId`: `componentId` of the layout element the pressed button is bound to<br>`buttonId`: `id` of the pressed button|
|
104
|
|**params**|`componentId`: `componentId` of the layout element the pressed button is bound to<br>`buttonId`: `id` of the pressed button|
|
103
|
|
105
|
|
104
|
## onNavigationButtonPressed
|
106
|
## onNavigationButtonPressed
|
105
|
Called when a TopBar button is pressed.
|
107
|
Called when a TopBar button is pressed.
|
|
|
108
|
+
|
106
|
```js
|
109
|
```js
|
107
|
class MyComponent extends Component {
|
110
|
class MyComponent extends Component {
|
108
|
onNavigationButtonPressed(buttonId) {
|
111
|
onNavigationButtonPressed(buttonId) {
|
|
|
|
|
113
|
|
116
|
|
114
|
## onSearchBarUpdated (iOS 11+ only)
|
117
|
## onSearchBarUpdated (iOS 11+ only)
|
115
|
Called when a SearchBar from NavigationBar gets updated.
|
118
|
Called when a SearchBar from NavigationBar gets updated.
|
|
|
119
|
+
|
116
|
```js
|
120
|
```js
|
117
|
class MyComponent extends Component {
|
121
|
class MyComponent extends Component {
|
118
|
onSearchBarUpdated(query, isFocused) {
|
122
|
onSearchBarUpdated(query, isFocused) {
|
|
|
|
|
123
|
|
127
|
|
124
|
## onSearchBarCancelPressed (iOS 11+ only)
|
128
|
## onSearchBarCancelPressed (iOS 11+ only)
|
125
|
Called when the cancel button on the SearchBar from NavigationBar gets pressed.
|
129
|
Called when the cancel button on the SearchBar from NavigationBar gets pressed.
|
|
|
130
|
+
|
126
|
```js
|
131
|
```js
|
127
|
class MyComponent extends Component {
|
132
|
class MyComponent extends Component {
|
128
|
onSearchBarCancelPressed() {
|
133
|
onSearchBarCancelPressed() {
|