소스 검색

Document updating tab options

Guy Carmeli 6 년 전
부모
커밋
4825a10b41
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12
    0
      docs/docs/layout-types.md

+ 12
- 0
docs/docs/layout-types.md 파일 보기

@@ -123,6 +123,18 @@ Navigation.mergeOptions(this.props.componentId, {
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 138
 ## sideMenu
127 139
 
128 140
 Expect center, left and right layouts