Important
For most of the documentation, refer to the original fivecar/react-native-draglist
repository.
To use this fork of fivecar/react-native-draglist
, you need to add the following under the dependencies
field in package.json
:
"react-native-draglist": "github:MissingCore/react-native-draglist"
If you want to use a specific commit in this fork (ie: to prevent things accidentally breaking when we change things), you can add a commit hash such as:
"react-native-draglist": "github:MissingCore/react-native-draglist#6e926d101e6293785d5cab4c014ccdc4812c19d2"
Note
@shopify/flash-list
should be an (optional?) peer dependency, meaning an error shouldn't be thrown if it's not installed (ie: if you only use the <FlatList />
variant).
There's 2 main exports:
"react-native-draglist"
is for the original<FlatList />
implementation."react-native-draglist/dist/FlashList"
is for our<FlashList />
implementation.
- For the
<FlashList />
implementation:- Removed the
CustomFlatList
prop. - Renamed
containerStyle
prop towrapperStyle
. - The
<View />
wrapping the<FlashList />
by default hasflex: 1
applied.
- Removed the
- For all implementations:
renderItem
function now provides anisDragging
value.- Removed the
key
prop on the rendered items (for performance reasons).- This means you need to handle the side effects of recycling.