We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b241eff + cd21d02 commit 948f40bCopy full SHA for 948f40b
1 file changed
src/RefreshControl.web.js
@@ -75,11 +75,12 @@ export default function RefreshControl({
75
PanResponder.create({
76
onStartShouldSetPanResponder: () => false,
77
onStartShouldSetPanResponderCapture: () => false,
78
- onMoveShouldSetPanResponder: () => {
+ onMoveShouldSetPanResponder: (_,gestureState) => {
79
if (!containerRef.current) return false
80
const containerDOM = findNodeHandle(containerRef.current)
81
if (!containerDOM) return false
82
return containerDOM.children[0].scrollTop === 0
83
+ && (Math.abs(gestureState.dy) > Math.abs(gestureState.dx) * 2 && Math.abs(gestureState.vy) > Math.abs(gestureState.vx) * 2.5)
84
},
85
onMoveShouldSetPanResponderCapture: () => false,
86
onPanResponderMove: (_, gestureState) => {
0 commit comments