Open ElegantSoft opened 4 years ago
Hey @ElegantSoft ! I don't understand how it could work if both carousels (ScrollView and Carousel) are vertical, since ScrollView (being the container) is "grabbing" the user event before Carousel. Even with zIndex, I don't know if it could work, did you read official ScrollView docs ? Maybe you can find some clues there.
I updated like this and it works like a charm
<Carousel
data={reminders}
layout="default"
renderItem={item => renderItem(item.item)}
activeSlideAlignment="center"
sliderHeight={slideHeight}
itemHeight={slideHeight}
vertical
nestedScrollEnabled // added this
autoplay
centerContent
onSnapToItem={index => {
setCurrentIndex(index);
}}
/>
<ScrollView // use ScrollView of react-native-gesture-handler
showsVerticalScrollIndicator={false}
scrollEventThrottle={16}
directionalLockEnabled={false}
disableScrollViewPanResponder
nestedScrollEnabled
removeClippedSubviews={false}
>
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
Is this a bug report, a feature request, or a question?
bug