Skip to content

How can I use @react-native-community/slider inside GestureDetector Pan, as pan gesture is conflicting with the draggable gesture of slider. #3469

Closed Answered by bunkscene
seeker710 asked this question in Q&A
Discussion options

You must be logged in to vote

Try this:

  const panGesture = Gesture.Pan()
    .activeOffsetX([-10, 10])
    .activeOffsetY([-10, 10])

This will prevent the pan gesture from activating until a certain number of pixels have been panned. You may need to combine that with something like requireExternalGestureToFail or blocksExternalGesture.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lovegaoshi
Comment options

Answer selected by m-bert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants