Skip to content

Commit

Permalink
Document configureGestureHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Dec 7, 2024
1 parent 48a6b03 commit fdbf5d6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
10 changes: 7 additions & 3 deletions versioned_docs/version-7.x/drawer-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,15 @@ Minimum swipe velocity that should activate opening the drawer. Defaults to `500

This is only supported on iOS and Android.

##### `gestureHandlerProps`
#### `configureGestureHandler`

Props to pass to the underlying pan gesture handler.
Callback to configure the underlying [gesture from `react-native-gesture-handler`](https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture). It receives the `gesture` object as an argument:

This is only supported on iOS and Android.
```js
configureGestureHandler={({ gesture }) => {
return gesture.enableTrackpadTwoFingerGesture(false);
}}
```

##### `children`

Expand Down
10 changes: 8 additions & 2 deletions versioned_docs/version-7.x/drawer-navigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,15 @@ Color overlay to be displayed on top of the content view when drawer gets open.

Style object for the component wrapping the screen content.

#### `gestureHandlerProps`
#### `configureGestureHandler`

Props to pass to the underlying pan gesture handler.
Callback to configure the underlying [gesture from `react-native-gesture-handler`](https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture). It receives the `gesture` object as an argument:

```js
configureGestureHandler: ({ gesture }) => {
return gesture.enableTrackpadTwoFingerGesture(false);
},
```

This is not supported on Web.

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-7.x/upgrading-from-6.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ We have removed all of the previously deprecated APIs. These APIs were deprecate
- `minSwipeDistance` - use `swipeMinDistance` option instead
- `overlayColor` - use `overlayColor` option instead
- `statusBarAnimation` - use `drawerStatusBarAnimation` option instead
- `gestureHandlerProps` - use `gestureHandlerProps` option instead
- `gestureHandlerProps` - use `configureGestureHandler` option instead
- `@react-navigation/bottom-tabs`
- Removed `lazy` prop - use `lazy` option instead
- Removed `tabBarOptions` prop which contained following options:
Expand Down

0 comments on commit fdbf5d6

Please sign in to comment.