question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Horizontal Carousel suppresses vertical scroll gesture handler

See original GitHub issue

Describe the bug I’m using a horizontal Carousel inside a FlatList inside ListHeaderComponent. It is not possible to scroll the FlatList vertically when trying to swipe over the horizontal Carousel. Most likely this also happens in a ScrollView.

To Reproduce Steps to reproduce the behavior:

  1. Add a FlatList
  2. Add Carousel into ListHeaderComponent
  3. Try to scroll with gesture on Carousel

Expected behavior The page scrolls vertically normally.

Screenshots Sorry, project under NDA

Versions (please complete the following information):

  • react: v17.0.1
  • react-native: v0.64.3
  • react-native-reanimated: v2.3.1
  • react-native-reanimated-carousel: v2.3.1
  • react-native-gesture-handler: v2.1.0

Smartphone (please complete the following information):

  • Device: LG K8+
  • OS: Android 9
  • Browser (?)
  • Version (?)

Additional context

<Carousel
      width={screenWidth}
      windowSize={5}
      height={180}
      data={[1, 2, 3]}
      loop={false}
      mode="parallax"
      modeConfig={{
        parallaxScrollingOffset: 50,
        parallaxScrollingScale: 0.82,
        parallaxAdjacentItemScale: 0.82,
      }}
      renderItem={() => <TopicCard progressValue={0} progressGoalValue={1} />}
    />

<FlatList
        data={data}
        renderItem={renderItem}
        contentContainerStyle={{ paddingTop: 28 }}
        keyExtractor={keyExtractor}
        ListHeaderComponent={header} // <- Carousel is here!
      />

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
yepMadcommented, Mar 7, 2022

@yepMad Hi~ Is there any progress?

Sorry for the delay, I wasn’t home this weekend! The solution of #125 fitted like a glove. I will add to the README 😃

0reactions
dohooocommented, Mar 6, 2022

@yepMad Hi~ Is there any progress?

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-reanimated-carousel - npm
#143 - Carousel suppresses ScrollView/FlastList scroll gesture handler: When using a carousel with a layout oriented to only one direction ...
Read more >
react native - Item vertical scroll interferes with carousel ...
I have a carousel (using react-native-snap-carousel ) where each item is a card that has a title and a WebView. On Android, when...
Read more >
rn-animated-carousel - npm Package Health Analysis - Snyk
#143 - Carousel suppresses ScrollView/FlastList scroll gesture handler: When using a carousel with a layout oriented to only one direction ...
Read more >
Handling touchscreen or mouse events: Slide Touch Handler
Suppress vertical or horizontal sliding. Per default, the Slide Touch Handler permits the user to slide the associated content both vertically and ...
Read more >
React Native: Carousels with Horizontal Scroll Views
Utilising ScrollView to create carousels works extremely well, maintaining a native and fluid feel to your app, while keeping the doors open for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found