computerjazz / react-native-draggable-flatlist

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

onDragEnd not fire right after animation finish #510

Open dioi2000 opened 10 months ago

dioi2000 commented 10 months ago

https://github.com/computerjazz/react-native-draggable-flatlist/assets/33106641/6de6d6d3-bb2e-42ba-8961-9e81f886c542

joerndyherrn commented 10 months ago

+1 Got the same issue and I'm updating data on dragEnd which causes rendering another component that seems to be laggy during the delay

joerndyherrn commented 9 months ago

I implemented calling onDragEnd directly if there is no placeholder skipping withSpring: https://github.com/LulububuSoftwareGmbH/react-native-draggable-flatlist/commit/f0b97cf7d0074ec30961c5dbaaad936581f905b2

abdullah253d2 commented 6 months ago

Please use keyExtractor={(item) => item.key} use param key integer

Monkhai commented 5 months ago

I have the same problem of the rerender. I am quite ok with the delayed firing but I get the same skip

abdullah253d2 commented 5 months ago

Using keyExtractor fixes the problem of rerender.

Monkhai commented 5 months ago

Not for me. I am updating using ReactQuery. If I put the data from there into a state and then use that it works but I lose the benefit of ReactQuery's caching management. I am using a string key as the library specifies.

WKampel commented 2 weeks ago

@Monkhai Did you ever find a solution to this?

Monkhai commented 2 weeks ago

@WKampel hey! did not but also just gave up and wrote my own drag and drop.