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

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

Open
umairalirehan opened this issue Sep 16, 2021 · 7 comments

Comments

@umairalirehan
Copy link

<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
Copy link

I'm also facing this same issue.

@umairalirehan
Copy link
Author

umairalirehan commented Sep 23, 2021 via email

@msvickylau
Copy link

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

@eliotball
Copy link

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
Copy link
Author

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
Copy link

lida99 commented Dec 29, 2021

I solved this issue by removing the changes made to AppDelegate.m file, which was a fix to another problem facebook/react-native#16376 (comment)

@MinhOmega
Copy link

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 !!

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

6 participants