Sometimes the onDragEnd does not fire. This seems to occur when you are nearing the top or bottom of the dragable range. There is a function called _isInsideDraggableRange which is causing the onDragEnd to be skipped if the animated value is either the top or bottom of the range. This is the due to the comparison being either > bottom or < top instead of >= bottom and <= top.
The drag problem can be fixed by amending the _isInsideDraggableRnge to the following:-
_isInsideDraggableRange(value, gestureState) {
const {top, bottom} = this.props.draggableRange
if (gestureState.dy > 0) {
return value => bottom
}
return value <= top
}
Environment
Version: 2.3.1
React Native version: 0.59.8
Platform(s) (iOS, Android, or both?): iboth
Device info (Simulator/Device? OS version? Debug/Release?): simulator
Issue Description
Sometimes the onDragEnd does not fire. This seems to occur when you are nearing the top or bottom of the dragable range. There is a function called _isInsideDraggableRange which is causing the onDragEnd to be skipped if the animated value is either the top or bottom of the range. This is the due to the comparison being either > bottom or < top instead of >= bottom and <= top.
The drag problem can be fixed by amending the _isInsideDraggableRnge to the following:-
Environment