Skip to content

Commit 101d93d

Browse files
authored
Update README.md
1 parent 0017d7e commit 101d93d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ yarn add react-native-draggable-flatlist
3232
All props are spread onto underlying [FlatList](https://facebook.github.io/react-native/docs/flatlist)
3333

3434
| Name | Type | Description |
35-
| :------------------------- | :---------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
35+
|----------------------------|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3636
| `data` | `T[]` | Items to be rendered. |
3737
| `horizontal` | `boolean` | Orientation of list. |
3838
| `renderItem` | `(params: { item: T, index: number, drag: () => void, isActive: boolean}) => JSX.Element` | Call `drag` when the row should become active (i.e. in an `onLongPress` or `onPressIn`). |
@@ -45,7 +45,7 @@ All props are spread onto underlying [FlatList](https://facebook.github.io/react
4545
| `autoscrollSpeed` | `number` | Determines how fast the list autoscrolls. |
4646
| `onRef` | `(ref: DraggableFlatList<T>) => void` | Returns underlying Animated FlatList ref. |
4747
| `animationConfig` | `Partial<Animated.SpringConfig>` | Configure list animations. See [reanimated spring config](https://github.com/software-mansion/react-native-reanimated/blob/master/react-native-reanimated.d.ts#L112-L120) |
48-
| `activationDistance` | `number` | Distance a finger must travel before the gesture handler activates. Useful when using a draggable list within a TabNavigator so that the list does not capture navigator gestures. | |
48+
| `activationDistance` | `number` | Distance a finger must travel before the gesture handler activates. Useful when using a draggable list within a TabNavigator so that the list does not capture navigator gestures. |
4949
| `onScrollOffsetChange` | `(offset: number) => void` | Called with scroll offset. Stand-in for `onScroll`. |
5050
| `onPlaceholderIndexChange` | `(index: number) => void` | Called when the index of the placeholder changes |
5151
| `dragItemOverflow` | `boolean` | If true, dragged item follows finger beyond list boundary. |
@@ -54,6 +54,8 @@ All props are spread onto underlying [FlatList](https://facebook.github.io/react
5454
| `containerStyle` | `StyleProp<ViewStyle>` | Style of the main component. |
5555
| `simultaneousHandlers` | `React.Ref<any>` or `React.Ref<any>[]` | References to other gesture handlers, mainly useful when using this component within a `ScrollView`. See [Cross handler interactions](https://docs.swmansion.com/react-native-gesture-handler/docs/interactions/). |
5656

57+
58+
5759
## Cell Decorators
5860

5961
Cell Decorators are an easy way to add common hover animations. For example, wrapping `renderItem` in the `<ScaleDecorator>` component will automatically scale up the active item while hovering (see example below).

0 commit comments

Comments
 (0)