react-native-draggable-flatlist icon indicating copy to clipboard operation
react-native-draggable-flatlist copied to clipboard

Only first 3 elements can be scrolled

Open NiketanG opened this issue 2 years ago • 2 comments

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

NiketanG avatar Jun 14 '23 19:06 NiketanG

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.

conner1reimers avatar Mar 25 '24 21:03 conner1reimers