Important
For most of the documentation, refer to the original fivecar/react-native-draglist repository.
Note
I've been experiencing the list flashing when an item is dropped after upgrading from v3.9.7 to v3.9.9.
a3847ce is the latest commit in our fork on v3.9.7.
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
CustomFlatListprop. - Renamed
containerStyleprop towrapperStyle. - The
<View />wrapping the<FlashList />by default hasflex: 1applied.
- Removed the
- For all implementations:
renderItemfunction now provides anisDraggingvalue.- Removed the
keyprop on the rendered items (for performance reasons).- This means you need to handle the side effects of recycling.