computerjazz / react-native-draggable-flatlist

A drag-and-drop-enabled FlatList for React Native
MIT License
1.92k stars 402 forks source link

Doesn't not work with react-native-gesture-handler ^2.16.0 on web. #531

Open Manouli opened 5 months ago

Manouli commented 5 months ago

Describe the bug The package doesn't seem to work with "react-native-gesture-handler": "^2.16.0" on web.

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

Additional context When upping the version of react-native-gesture-handler from 2.9.0 to 2.16.0 the package does not work on web.

I will demonstrate with videos the before and after to showcase it. The interesting part is that when adding the debug prop you can drag using the debug orange bars but not the actual drag handle as its broken. I will try to demonstrate that in the video. I am not sure what is causing this. Also notice how the ScaleDecorator breaks.

Video with version 2.9.0:

https://github.com/computerjazz/react-native-draggable-flatlist/assets/6332957/f28e4b53-d5f4-4481-82f0-657c6dcaa758

Video with version 2.16.0

https://github.com/computerjazz/react-native-draggable-flatlist/assets/6332957/6ae3b09c-7e6c-4012-9471-54739790181b

Any help would be greatly appreciated.

edwinvrgs commented 5 months ago

This is happening to us too.

northkevin commented 4 months ago

Same here +1 on version: 2.16.0

Versions in yarn.lock file

"react-native-draggable-flatlist@npm:^3.1.2":
  version: 3.1.2
  ...,
"react-native-gesture-handler@npm:^2.3.1":
  version: 2.16.0
  ...

https://github.com/computerjazz/react-native-draggable-flatlist/assets/34978297/3f0a7dd1-01a5-43cf-bc04-f9eb53053883

reececox commented 4 months ago

Setting the list's activationDistance resolves the issue for me on web:

<DraggableFlatList
  ...
  activationDistance={1}
/>

This sets the activeOffsetY on the underlying pan gesture (from react-native-gesture-handler).