meliorence / meliorence/react-native-snap-carousel

Default Layout Last Item should be attached to right side

Open
#835 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 question. I am using default layout with activeSlideAlignment={'start'}. Suppose if I have 4 items, If I scroll to far left, the last item will be shown attached to left side with plenty of white space. I want to stop left scrolling if the last item is shown, similarly for right swipe as well.

Image 1: Normal state when items are filled in carousel
WhatsApp Image 2021-04-26 at 5 27 01 PM

Image2: All items swiped to far left showing white space in right side
WhatsApp Image 2021-04-26 at 5 27 01 PM (1)

Note that I have more than 3 items in each section but still it will scroll last item all the way to left side.

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 with the README sections on default layout and activeSlideAlignment, then reproduce the four-item case described in the issue with scrolling in both directions. Done means the last item stops at the carousel edge without leaving the reported excess white space, while preserving the normal alignment behavior.

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.