Skip to content

First image in carousel disappears on overdrag when the windowSize is smaller than data length #868

@szarbartosz

Description

@szarbartosz

Describe the bug
When I render a non loopable carousel that does not take the whole device width (and there is a space to drag over it with pan gesture) the first image disappears on the overdrag, after reaching certain treshold, if the windowSize prop is set to be lower than the data.length. I'll prepare a pr with a fix for the issue.

To Reproduce
Steps to reproduce the behavior:

  1. Use the Normal example form the example app
  2. Change the carousel width to take 1/2 screen width
  3. Add windowSize prop (lower than the data length)
  4. Overdrag the first item in the carousel
  5. See error

Expected behavior
The image should not disappear on overdrag - it should be visible (you can observe the appropriate behavior when you delete the windowSize prop)

Screenshots

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-11-27.at.16.38.51.mp4

Versions (please complete the following information):

  • react: v19.1.0
  • react-native: v0.81.4
  • react-native-reanimated: v4.1.0
  • react-native-reanimated-carousel: v4.0.3
  • react-native-gesture-handler: v2.28.0

Smartphone (please complete the following information):

  • Device: iPhone16 simulator
  • OS: iOS 18.6

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions