You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.`npm install react-native-draggable-flatlist` or `yarn add react-native-draggable-flatlist`
6
8
2.`import DraggableFlatlist from 'react-native-draggable-flatlist'`
7
9
8
10
## Api
9
11
10
-
### DraggableFlatList
11
-
12
12
Props:
13
-
-`data` (Array)
13
+
-`data` (Array) Items to be rendered.
14
14
-`renderItem` (Function) `({ item, index, move, moveEnd, isActive }) => <Component />`. Call `move` when the row should become active (in an `onPress`, `onLongPress`, etc). Call `moveEnd` when the gesture is complete (in `onPressOut`).
-`scrollPercent` (Number) Sets where scrolling begins. A value of `5` will scroll up if the finger is in the top 5% of the FlatList container and scroll down in the bottom 5%.
18
+
-`onMoveEnd` (Function) `({ data, to, from, row }) => void` Returns updated ordering of `data`
19
+
-`onMoveBegin` (Function) `(index) => void` Called when row becomes active.
0 commit comments