Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Maazy3 opened this issue Jan 9, 2025 · 0 comments

Comments

@Maazy3
Copy link

Maazy3 commented Jan 9, 2025

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.

WhatsApp.Video.2025-01-09.at.16.32.40.mp4

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)}
>

</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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant