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

Library does not work with a multi-column flat list #567

Open
nilsm opened this issue Dec 13, 2024 · 1 comment
Open

Library does not work with a multi-column flat list #567

nilsm opened this issue Dec 13, 2024 · 1 comment

Comments

@nilsm
Copy link

nilsm commented Dec 13, 2024

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.

Describe the bug
I've implemented drag/drop for a list with a single column of items. Everything works well. Changing numColumns to 2 stops the drag and drop from working.

The behaviour is not consistent - sometimes it drags/drops an entire row of the list but most of the time nothing happens at all.

To Reproduce
start with a working DraggableFlatList example, then add numColumns={2} to the props

Platform & Dependencies
Please list any applicable dependencies in addition to those below (react-navigation etc).

  • react-native-draggable-flatlist version: 4.0.1
  • Platform: Android
  • React Native or Expo version: 52.0.18
  • Reanimated version: 3.16.1
  • React Native Gesture Handler version: 2.20.2

Additional context
Just wondering whether multiple columns are officially supported?

@BEGDAR8ZOUHAIR
Copy link

The error you're encountering occurs because numColumns is not supported when horizontal is set to true in DraggableFlatList. These two props are mutually exclusive in React Native's FlatList implementation.
You can handle the grid layout manually by Adding Styles

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