|
|
|
|
123
|
});
|
123
|
});
|
124
|
```
|
124
|
```
|
125
|
|
125
|
|
|
|
126
|
+### Changing BottomTabs visibility
|
|
|
127
|
+The `visible` property can be used to control the BottomTab visibility.
|
|
|
128
|
+
|
|
|
129
|
+On **Android**, Visibility can be toggled dynamically using the `mergeOptions` command. When hiding BottomTabs, `drawBehind: true` should be specified in order for the screen to render behind the area which was previously allocated to the BottomTabs.
|
|
|
130
|
+
|
|
|
131
|
+```js
|
|
|
132
|
+Navigation.mergeOptions(componentId, {
|
|
|
133
|
+ bottomTas: visible: false,
|
|
|
134
|
+ ...Platform.select({ android: { drawBehind: true } })
|
|
|
135
|
+});
|
|
|
136
|
+```
|
|
|
137
|
+
|
|
|
138
|
+On **both** platforms visibility can be changed when pushing screens into a stack which is a direct child of a `BottomTabs` layout:
|
|
|
139
|
+
|
|
|
140
|
+```js
|
|
|
141
|
+Navigation.push(componentId, {
|
|
|
142
|
+ component: {
|
|
|
143
|
+ name: 'pushedScreen',
|
|
|
144
|
+ options: { bottomTas: visible: false }
|
|
|
145
|
+ }
|
|
|
146
|
+ });
|
|
|
147
|
+```
|
|
|
148
|
+
|
|
|
149
|
+
|
126
|
### Updating options for a specific tab
|
150
|
### Updating options for a specific tab
|
127
|
Updating (merging) tab specific options is done using the `mergeOptions` command. `mergeOptions` expects a `componentId` as first argument, therefore in order to update a specific tab we'll need to pass a `componentId` of a child of that specific tab.
|
151
|
Updating (merging) tab specific options is done using the `mergeOptions` command. `mergeOptions` expects a `componentId` as first argument, therefore in order to update a specific tab we'll need to pass a `componentId` of a child of that specific tab.
|
128
|
For example, Using the layout specified above, To update the `badge` property of the second tab we'll call `mergeOptions` with `SecondScreenId`.
|
152
|
For example, Using the layout specified above, To update the `badge` property of the second tab we'll call `mergeOptions` with `SecondScreenId`.
|