react-native-draggable-flatlist
react-native-draggable-flatlist copied to clipboard
Only first 3 elements can be scrolled
Describe the bug The list allows to drop only first 3 items. Only those items move as per the drop zone moves. If I drag any item over other items except those 3, they won't move. I cannot drop them anywhere else to change the position as well.
To Reproduce
<DraggableFlatList
getItemLayout={getItemLayout}
data={data1}
maxToRenderPerBatch={10}
updateCellsBatchingPeriod={100}
windowSize={10}
dragItemOverflow
keyExtractor={(item, index) => index.toString()}
refreshControl={
<RefreshControl
refreshing={isLoading}
onRefresh={refetch}
/>
}
onDragEnd={({ data, from, to }) => {
setData1(data);
}}
renderItem={renderItem}
/>
Platform & Dependencies Please list any applicable dependencies in addition to those below (react-navigation etc).
- react-native-draggable-flatlist version: 4.0.1
- Platform: iOS
- React Native or Expo version: 0.69.9, Expo ~46.0.16
- Reanimated version: 2.9.1
- React Native Gesture Handler version: 2.5.0
Removing the getItemLayout prop resolved this issue in my case. You'll be missing out on some optimizations, though it shouldn't make much of a difference with shorter lists.