computerjazz / react-native-draggable-flatlist

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

IOS: drag and drop not working on ios. while working perfectly on android. #314

Open umairalirehan opened 3 years ago

umairalirehan commented 3 years ago

<DraggableFlatList data={data} renderItem={renderItem} keyExtractor={(item, index) => index.toString()} onDragEnd={({ data }) => setData(data)}

const renderItem = useCallback( ({ item, index, drag, isActive }) => { return ( <TouchableOpacity style={{ height: 50, backgroundColor: isActive ? colors.paratGreen : index % 2 === 0 ? colors.solidRed : colors.solidBgFb, alignItems: "center", justifyContent: "center", marginVertical: hp('0.25') }} onLongPress={drag}

<Text style={{ fontFamily: fontFamily.semiBold, color: colors.white, fontSize: hp('2'), }}

{item.serviceName} ); }, [] );

ihiteshkumar commented 3 years ago

I'm also facing this same issue.

umairalirehan commented 3 years ago

We can hope that the issue will be solved soon. please when will you get the solution for that. kindly share that solution with me.

On Thu, Sep 23, 2021 at 3:31 AM Hitesh Kumar @.***> wrote:

I'm also facing this same issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/computerjazz/react-native-draggable-flatlist/issues/314#issuecomment-925375696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKV2NFME3UMK7WMO6DUJHJDUDJKK3ANCNFSM5EEOJHSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

msvickylau commented 3 years ago

@umairalirehan You might need to downgrade react-native-reanimated, v 1.13.3 is the latest working version with draggable flatlist

eliotball commented 3 years ago

I also had a problem matching this description, having react-native-reanimated v2.1.0, and in the simulator drag would trigger, setting isActive to true, but no drag would occur when the gesture began. However, per #282, after disabling debugging (ctrl+cmd+z and then select Stop Debugging from the menu) the library worked as expected (even with react-native-reanimated v2.1.0).

Bottom line: if you have this issue in the simulator, try turning debugging off.

umairalirehan commented 3 years ago

I also had a problem matching this description, having react-native-reanimated v2.1.0, and in the simulator drag would trigger, setting isActive to true, but no drag would occur when the gesture began. However, per #282, after disabling debugging (ctrl+cmd+z and then select Stop Debugging from the menu) the library worked as expected (even with react-native-reanimated v2.1.0).

Bottom line: if you have this issue in the simulator, try turning debugging off.

my problem solved with your help. its working now by closing debugging mode off. you are a great helper. thanks alot

lida99 commented 2 years ago

I solved this issue by removing the changes made to AppDelegate.m file, which was a fix to another problem https://github.com/facebook/react-native/issues/16376#issuecomment-810094592

MinhOmega commented 2 years ago

I also had a problem matching this description, having react-native-reanimated v2.1.0, and in the simulator drag would trigger, setting isActive to true, but no drag would occur when the gesture began. However, per #282, after disabling debugging (ctrl+cmd+z and then select Stop Debugging from the menu) the library worked as expected (even with react-native-reanimated v2.1.0).

Bottom line: if you have this issue in the simulator, try turning debugging off.

I have turn off debugging and it working. Thanks !!

RambousekTomas commented 3 months ago

Hi, I am having exactly the same issue, but I am not in debug mode. Android works perfectly, but iOS does not.

Does this library supports latest react-native and reanimated? I am using these versions: "react-native": "0.73.6", "react-native-reanimated": "^3.11.0",

binitjha452 commented 1 week ago

still facing issue in iOS

binitjha452 commented 1 week ago

any solutions?