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

dragItemOverflow allows dragging over the ListHeader #534

Open
melhawnuhra opened this issue May 13, 2024 · 1 comment
Open

dragItemOverflow allows dragging over the ListHeader #534

melhawnuhra opened this issue May 13, 2024 · 1 comment

Comments

@melhawnuhra
Copy link

Describe the bug
With dragItemOverflow=false, I expect the items to be confined within the list (header not included).
Can we add some way to exclude the header?

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

Additional context
Screen recording demonstrating the problem:

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-05-13.at.11.11.40.mp4
@officialtpss
Copy link

officialtpss commented Sep 18, 2024

@melhawnuhra I believe the issue might be related to the Gesture Handler at the root level. A possible solution would be to wrap your DraggableFlatList inside a GestureHandlerRootView like this

  // <GestureHandlerRootView style={{ minHeight: "100%", width: "100%" }}>
  //   <DraggableFlatList
  //     data={data}
  //     renderItem={renderItem}
  //     keyExtractor={(item, index) => `draggable-item-${item.key}`}
  //     onDragEnd={({ data }) => {
  //       updateSortedArrayToServer(data);
  //     }}
  //   />
  // </GestureHandlerRootView>

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

2 participants