Skip to content

Commit a06297c

Browse files
committed
Update docs for native botom tabs
1 parent 6244763 commit a06297c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

versioned_docs/version-7.x/native-bottom-tab-navigator.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ Uses iOS built-in tab bar items with standard iOS styling and localized titles.
122122
- `search`
123123
- `topRated`
124124

125-
If set to `search`, it's positioned next to the tab bar on iOS 26 and above.
125+
If set to `search`, the tab is positioned as a separate item on the tab bar on iOS 26+.
126+
127+
For the `search` item, when the tab is selected, the tab bar transforms into a search field if the screen in the tab navigator or a nested [native stack navigator](native-stack-navigator.md) has [`headerSearchBarOptions`](native-stack-navigator.md#headersearchbaroptions) configured and the native header is shown with [`headerShown: true`](native-stack-navigator.md#headershown). This won't work if a custom header is provided with the `header` option.
126128

127129
The [`tabBarIcon`](#tabbaricon) and [`tabBarLabel`](#tabbarlabel) options will override the icon and label from the system item. If you want to keep the system behavior on iOS, but need to provide icon and label for other platforms, use `Platform.OS` or `Platform.select` to conditionally set `undefined` for `tabBarIcon` and `tabBarLabel` on iOS.
128130

@@ -384,14 +386,11 @@ This event is fired when the user presses the tab button for the current screen
384386
- If the screen for the tab renders a scroll view, you can use [`useScrollToTop`](use-scroll-to-top.md) to scroll it to top
385387
- If the screen for the tab renders a stack navigator, a `popToTop` action is performed on the stack
386388

387-
To prevent the default behavior, you can call `event.preventDefault`:
389+
The default behavior of the tab press is controlled natively and cannot be prevented.
388390

389391
```js
390392
React.useEffect(() => {
391393
const unsubscribe = navigation.addListener('tabPress', (e) => {
392-
// Prevent default behavior
393-
e.preventDefault();
394-
395394
// Do something manually
396395
// ...
397396
});

0 commit comments

Comments
 (0)