Open huseyintopuz opened 4 months ago
To prevent your horizontal carousel from scrolling horizontally when you try to scroll down and ensure that vertical scrolling works as expected, you can use the panGestureHandlerProps
to configure the gesture handler. Here's a solution that has worked well:
panGestureHandlerProps={{
activeOffsetX: [-10, 10], // Enable horizontal panning
failOffsetY: [-5, 5], // Limit vertical movement to fail the gesture
}}
Explanation:
For more details, you can refer to a similar discussion here [1].
To continue the conversation, mention @dosu.
thanks it works
i have a horizontal carousel. if i scroll down on carousel, it still scrolling horizontally how to prevent this ?.