react-native-reanimated-carousel icon indicating copy to clipboard operation
react-native-reanimated-carousel copied to clipboard

[question] Is it possible to disable the overscroll?

Open fabriziocucci opened this issue 2 years ago • 9 comments

By the default, it is possible to overscroll when swiping right on the first element and left on the last element.

As per title, is it possible to disable the overscroll altogether?

fabriziocucci avatar Dec 10 '22 18:12 fabriziocucci


🔴

👨‍💻 I'm so busy recently, so I'm going away for a little while, but I'll come back by the end of this month.

♥️ Rest assured, I love this project, I will not give up.

2022.11.xx


github-actions[bot] avatar Dec 10 '22 18:12 github-actions[bot]

Hello.

I dont know if it is your point, but did you try the loop prop? Just set it to false to disable overscroll.

eduard1dev avatar Dec 26 '22 03:12 eduard1dev

I am also curious on the same. Disabling the loop is fine. But can we disable the elastic scroll at the edge of left and right most cards?

vickylance avatar Feb 07 '23 12:02 vickylance

I want to stop scrolling at the edge of the left and right for specific scenarios. so can I?

Nensi9 avatar Jun 13 '23 07:06 Nensi9

Yes, I found it through enabled prop you can achieve it.

Nensi9 avatar Jun 13 '23 09:06 Nensi9

Yes, I found it through enabled prop you can achieve it.

How? I dont want to disable all swiping, only when you reach the ends of the carousel.

There's a prop called overscrollEnabled, but it doesn't work

bpeck81 avatar Dec 18 '23 22:12 bpeck81

Same question here, could we provide sth like ScrollView bounces? Which won't let view bounces when reaches the end of content.

bozha-step avatar Mar 20 '24 12:03 bozha-step

@dohooo any idea on this?

bpeck81 avatar Jun 11 '24 05:06 bpeck81

I figured it out. Modify this prop.

panGestureHandlerProps={{ failOffsetX: currentIndex == 0 ? 1 : currentIndex == item.images_array?.length-1 ? -1 : null }}

bpeck81 avatar Jun 11 '24 07:06 bpeck81