meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.36k stars 2.29k forks source link

How to handle scrolling through multiple items #600

Open halileohalilei opened 5 years ago

halileohalilei commented 5 years ago

Is this a bug report, a feature request, or a question?

A question.

I have a calendar view in my app just like the Health app on iOS and I'm using the carousel to render the items for each day. I want to be able to scroll through the days programmatically when the user taps on a specific date. The problem is, the carousel scrolls through all the items between the current date and the date that the user selects, which can be a lot. I want the carousel to scroll to the selected date as if there were no items in between.

Is there anything I can use in the library to achieve this, or do I need to pull some tricks splicing my data?

bd-arc commented 5 years ago

Hi @halileohalilei,

The only thing doable with the plugin at this point is to set the second parameter of snapToItem to false in order to disable the scroll animation.

I'm pretty sure this is not what you're after though...

cenaHara commented 4 years ago

hi @bd-arc any update solution ?

dohooo commented 3 years ago

Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2