Android: No Dragging, Item Jumps to Top (RN 0.61.5)
See video:

Repro
npx react-native init XXX --template react-native-template-typescript- Install peer dependencies
- Replace content of App.tsx with example code from readme
- Run on Android
Package: Dependencies
"dependencies": { "react": "16.9.0", "react-native": "0.61.5", "react-native-draggable-flatlist": "^2.0.10", "react-native-gesture-handler": "^1.5.2", "react-native-reanimated": "^1.4.0" },
Same issue
Have you followed the extra setup instructions for rngh in MainActivity? It's not 100% autolinked... https://software-mansion.github.io/react-native-gesture-handler/docs/getting-started.html
I had the same issue, but following guide on proper installing react-native-gesture-handler mentioned by computerjazz solved this for me. https://software-mansion.github.io/react-native-gesture-handler/docs/getting-started.html
@chriszwickerocteris did you try the above solution? Can we close this?
Indeed, that solves it, thanks - and sorry, hadn't had the time to review before!
I would suggest documenting this in the installation steps section of the README, though. In times of autolinking, I may not be the only one not checking peer dependencies' docs.
@computerjazz hi I see this behaviour when the component is presented inside Modal. Once it is presented in regular view everything works as expected so I guess it's not installation issue. Is there any known issue related to Modal ? I didn't find anything
anyway, for now my workaround is to simulate Modal behaviour using regular view.
@computerjazz hi I see this behaviour when the component is presented inside Modal. Once it is presented in regular view everything works as expected so I guess it's not installation issue. Is there any known issue related to Modal ? I didn't find anything
anyway, for now my workaround is to simulate Modal behaviour using regular view.
the same, reproduced on Android only I'm using react-navigation
I can also confirm it does not work as expected inside a Modal
Hey guys, I've found the solution to getting it to work inside a modal. Just wrap the Component you want to use as the modal inside gestureHandlerRootHOC.
Example:
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
const MyModalComponent = (props) => {
return (<View> .... </View>)
}
export default gestureHandlerRootHOC(MyModalComponent)
This got it working like a charm for me. :)