Skip to content

Unable to swipe on a dynamic carousel initialized with 1 child #66

Open
@sayaad

Description

@sayaad

Describe the bug

When a dynamic carousel is initialized with 1 element, you are not able to swipe/change the currently selected element, even after more children are added to the carousel, as if the carousel still thinks it still only has 1 child.

Edit: The bug happens when the show prop is greater than or equal to the amount of children it is initialized with.

Reproduction

Reproduction pen

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
    Memory: 22.60 GB / 31.92 GB
  Binaries:
    Node: 14.15.4 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.10 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 98.0.4758.102
    Edge: Spartan (44.19041.1266.0), Chromium (98.0.1108.55)
    Internet Explorer: 11.0.19041.1202
  npmPackages:
    @trendyol-js/react-carousel: ^2.0.1 => 2.0.1

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions