Skip to content

[Android & iOS] Setting an invalid CurrentItem causes scroll to last item in looped CarouselView #32139

@SyedAbdulAzeemSF4852

Description

@SyedAbdulAzeemSF4852

Description

  • When a current item is set to a value that doesn't exist in the CarouselView's items source, the carousel incorrectly scrolls to the last item in a looped carousel.
  • However, when looping is disabled, CurrentItem is updated, but no scroll occurs.
iOS_LoopedCarousel iOS_NonLoopedCarousel
LoopedCarousel.mov
NonLoopedCarousel.mov

Steps to Reproduce

  1. Download the attached sample.
  2. Run the sample on an Android or iOS.
  3. Tap the "Select Item 14" button (note that item 14 is an invalid item).
  4. Observe that the carousel automatically scrolls to the last item in the item source.

SampleRepo.zip

Link to public reproduction project repository

No response

Version with bug

9.0.120

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

No response

Affected platforms

Android, iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions