Describe the bug
When using loopPages() with a small number of items (eg. 3), if I swipe on the last item, the pager scrolls all the way back to the beginning (or end) instead of just scrolling to the next item.
To Reproduce
In the InfiniteExampleView, set data2 to Array(0..<3)
Apply the modifier .loopPages(true, repeating: 10) on the looping pager.
Attempt to page through the end of the Pager. Try in both directions.
Expected behavior
I expected the pager to scroll forward to the next item (which would be the item at index 0).
(And I would expect the opposite when going in the other direction as well)
Describe the bug When using
loopPages()
with a small number of items (eg. 3), if I swipe on the last item, the pager scrolls all the way back to the beginning (or end) instead of just scrolling to the next item.To Reproduce
In the
InfiniteExampleView
, setdata2
toArray(0..<3)
Apply the modifier.loopPages(true, repeating: 10)
on the looping pager. Attempt to page through the end of the Pager. Try in both directions.Expected behavior
I expected the pager to scroll forward to the next item (which would be the item at index 0). (And I would expect the opposite when going in the other direction as well)
Screenshots / Videos
https://user-images.githubusercontent.com/12040919/147604197-d6b92aaf-0532-4f83-9b7f-0b3863a29505.mp4
Environment: