meliorence / meliorence/react-native-snap-carousel

Autoplay doesn't work correctly in vertical

Open
#602 2 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?

This is a bug report

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

I just try it in ios. don't know the effect in android.

Is the bug reproductible in a production environment (not a debug one)?

i don't have try. and just in debug discover it.
bug i think it will also happened in release

Environment

Environment:
React: 16.10.2
React native: 0.61.2
react-native-snap-carousel: 3.8.2

Target Platform:
Android (6.0)
iOS (10.3) 13.2

Expected Behavior

Not Vertical
it's great.

  1. autoplay can work correctly.
  2. don't have any behavior when i touch it

(Write what you thought would happen.)

Actual Behavior

when i in "vertical" mode.

  1. autoplay can't work correctly.
  2. it will scroll to the above item when i touch it

(Write what happened. Add screencasts/screenshots!)

Reproducible Demo
                <Carousel
                  vertical  \\ you can remove it get the right behavior 
                  loop
                  useScrollView
                  autoplay
                  lockScrollWhileSnapping
                  data={[1, 2, 3]}
                  renderItem={({ item, index }) => <Text>{item}</Text>}
                  itemHeight={100} 
                  sliderHeight={100}
                  \\ itemWidth={100} \\ should remove \\ when your remove the vertical
                  \\ sliderWidth={100} \\  like above
                />

(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)

Steps to Reproduce

(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)

  1. copy the component above
  2. make the vertical to true
  3. make the autoplay to true, and touch it

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

No source file or test is named. Start by reproducing the shown Carousel configuration with vertical and autoplay enabled, then compare it with vertical disabled to isolate the autoplay and touch-scrolling behavior. Done means vertical mode autoplays correctly and touching the carousel does not unexpectedly move to the previous item.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
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.