Skip to content

carouselState incorrect when infinite={true} #470

@spaansba

Description

@spaansba

Describe the bug
Whn infinite={true} the carouselState has incorrect state for:

  • totalItems
  • currentSlide

To Reproduce

  1. Create a carousel with infinte={true}
  2. Access the carouselState somehow (e.g. customButtonGroup/beforeChange/afterChange etc)
  3. The totalItems/currentSlide are incorrectly set

Expected behavior
When the carousel holds 3 items the totalItems should be 3 while the currentSlide should hold the index of the currentSlide. This is not the case when infinte is set to true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions