dohooo / react-native-reanimated-carousel

🎠 React Native swiper/carousel component, fully implemented using reanimated v2, support to iOS/Android/Web. (Swiper/Carousel)
https://react-native-reanimated-carousel.vercel.app
MIT License
2.73k stars 317 forks source link

[question] Is it possible to disable the overscroll? #320

Open fabriziocucci opened 1 year ago

fabriziocucci commented 1 year ago

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?

github-actions[bot] commented 1 year ago

🔴

👨‍💻 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


eduard1dev commented 1 year ago

Hello.

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

vickylance commented 1 year ago

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?

Nensi9 commented 1 year ago

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

Nensi9 commented 1 year ago

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

bpeck81 commented 9 months ago

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

bozha-step commented 6 months ago

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

bpeck81 commented 3 months ago

@dohooo any idea on this?

bpeck81 commented 3 months ago

I figured it out. Modify this prop.

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