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

Android | IOS .Not being able to drag onto end of list on large list data set.

Open Maazy3 opened this issue 11 months ago • 1 comments

This package has external dependencies of react-native-reanimated and react-native-gesture-handler which must be installed separately. Before opening an issue related to animations or gestures please verify that you have completed ALL installation steps, including the changes to MainActivity.

https://github.com/user-attachments/assets/22226e64-8107-4b50-b2bb-06e2e52b31b7

Describe the bug When working with a large dataset, items in the list cannot be dragged and dropped to the last position, particularly when attempting to sort the list in ascending order.Normally happening when list of data exceeds 30 or 40 items it stops dragging onto the end of list This behaviour is observed on both Android and iOS.

To Reproduce

Below is a minimal reproduction of the issue. The renderItem method uses a simple component without any heavy computation.

const _renderItem = useCallback( ({ item, drag, getIndex, isActive }: ISwipeDragStopCard) => { const index = getIndex(); return ( <Animated.View key={CONSTANTS.ANIMATION.UNIQUE_KEY} entering={CONSTANTS.ANIMATION.FADE_IN_RIGHT(500)} > <Card index={index} data={item} drag={drag} isActive={isActive} /> </Animated.View> ); }, [] );

<DraggableFlatList data={stops} ref={flatListRef} showsVerticalScrollIndicator={false} style={{height:'100%'}} renderItem={_renderItem} getItemLayout={getItemLayout} ListEmptyComponent={_renderListEmptyComponent} keyExtractor={keyExtractor} onDragBegin={onDragBegin} onDragEnd={onReSequenceCompleted} />

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 and ANDROID
  • React Native or Expo version: "0.72.6"
  • Reanimated version: "3.6.1"
  • React Native Gesture Handler version: "^2.20.2"

Additional context I attempted to resolve the issue by downgrading the gesture handler to version 2.13.4 before updating to version 2.20.2, but the problem persists.

Maazy3 avatar Jan 09 '25 11:01 Maazy3