meliorence / meliorence/react-native-snap-carousel

Vertical carousel not working inside scrollview

Open
#746 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

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

bug

<ScrollView
        style={styles.scrollStyle}
        contentContainerStyle={styles.scrollContent}
        bounces={false}
        // disableScrollViewPanResponder
        // nestedScrollEnabled
        // directionalLockEnabled={false}
      >
        <Image source={neck} style={styles.necKImage} />
        <View>
          <View style={{ marginHorizontal: 30 }}>
            {userCards.length === 0 ? (
              <View
                style={{ alignItems: "center", width: "100%", marginTop: 20 }}
              >
                <CardHolder
                  onPress={() =>
                    Actions.addcard({ freeBalance: userDetails.freeBalance })
                  }
                />
              </View>
            ) : (
              <View style={{ zIndex: 5555 }}>
                <Carousel
                  data={userCards}
                  renderItem={renderCard}
                  sliderHeight={270}
                  itemHeight={200}
                  // layout="stack"
                  vertical
                  loop
                  loopClonesPerSide={10}
                  useNativeDriver
                  layoutCardOffset={30}
                  inactiveSlideOpacity={1}
                  activeSlideAlignment={
                    Platform.OS === "android" ? "end" : "start"
                  }
                />
              </View>
            )}
          </View>
          <TouchableDebounce
            activeOpacity={0.5}
            onPress={() =>
              Actions.addcard({ freeBalance: userDetails.freeBalance })
            }
            style={{
              position: "absolute",
              bottom: -30,
              right: I18nManager.isRTL ? undefined : -0,
              left: I18nManager.isRTL ? -0 : undefined,
              zIndex: 2,
            }}
          >
            <Image
              source={add}
              style={{ width: 70, height: 70, zIndex: 2 }}
              resizeMode="contain"
            />
          </TouchableDebounce>
        </View>
        <Invoices makeOrderForItems={makeOrderForItems} />
        <HomeTransactions
          transactions={transactions}
          refreshing={false}
          onRefresh={getTransactions}
        />
      </ScrollView>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided vertical Carousel inside a React Native ScrollView, including the shown scroll and carousel props, and isolate whether the failure is caused by nested gesture handling. Compare behavior across the affected platforms and configurations; done means the vertical carousel can be used inside the ScrollView without preventing the surrounding content from scrolling.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.