Browse Source

Document updating tab options

Guy Carmeli 6 years ago
parent
commit
4825a10b41
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      docs/docs/layout-types.md

+ 12
- 0
docs/docs/layout-types.md View File

123
 });
123
 });
124
 ```
124
 ```
125
 
125
 
126
+### 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.
128
+For example, Using the layout specified above, To update the `badge` property of the second tab we'll call `mergeOptions` with `SecondScreenId`.
129
+
130
+```js
131
+Navigation.mergeOptions('SecondScreenId', {
132
+  bottomTab: {
133
+    badge: 'New'
134
+  }
135
+});
136
+```
137
+
126
 ## sideMenu
138
 ## sideMenu
127
 
139
 
128
 Expect center, left and right layouts
140
 Expect center, left and right layouts