mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 22:30:36 +08:00
* Add previous scene to tabBarOnPress - fix #2787 * Update docs for tabBarOnPress
This commit is contained in:
@@ -177,7 +177,13 @@ Title string of a tab displayed in the tab bar or React Element or a function th
|
||||
|
||||
#### `tabBarOnPress`
|
||||
|
||||
Callback to handle tap events; arguments are the `scene: { route, index }` that was tapped and a `jumpToIndex` method that can perform the navigation for you.
|
||||
Callback to handle tap events; the argument is an object containing:
|
||||
|
||||
* the `previousScene: { route, index }` which is the scene we are leaving
|
||||
* the `scene: { route, index }` that was tapped
|
||||
* the `jumpToIndex` method that can perform the navigation for you
|
||||
|
||||
Useful for adding a custom logic before the transition to the next scene (the tapped one) starts.
|
||||
|
||||
### Navigator Props
|
||||
|
||||
|
||||
Reference in New Issue
Block a user