Search code examples
sapui5

Does the loop property of the sap.m.Carousel work?


I am trying to enable the Carousel's loop feature. In my view, I declare the property:

<Carousel height="auto" loop="true" pages="{ProductCollection}">
  <customLayout>
    <CarouselLayout visiblePagesCount="2" />
  </customLayout>
</Carousel>

It seems not to work!

Here's a sample of my code: https://embed.plnkr.co/zILEH3/


Solution

  • Turns out it was a bug that it worked backwards at all 😄 which is fixed by now..

    According to the note in the API reference, which I missed, the sap.m.Carousel was designed to ignore the loop if the visiblePagesCount is not 1.

    Note: When this property is set to something different than the default value, the loop property of Carousel is ignored.