Spicy-Sparks / react-native-flashdrag-list

Draggable FlashList for react-native
MIT License
54 stars 2 forks source link

begin drag is a not a function #2

Closed rohankm closed 6 months ago

rohankm commented 1 year ago

Hi,

Begin drag is not a function its just returning a boolean value

TypeError: onLongPress is not a function (it is false), js engine: hermes
kaitoo1 commented 6 months ago

@rohankm this is probably a bit late for you but sharing in case it helps anyone else - it looks like the example in the readme is off. beginDrag is the 4th param not 3rd so you're probably accessing the active value not beginDrag

from FlashDragList.tsx :


 renderItem: (
    item: any,
    index: number,
    active: boolean,
    beginDrag: () => any
  ) => JSX.Element;```
geroale commented 6 months ago

Hello, yes, the issue was a mistake in the README. We updated it according to the actual library.