Summary
An unexpected behavior occurs when using vtex.slider-layout, if these two props are set together:
- infinite: true
- navigationStep: 1
In this case, when the slider is scrolled using the right arrow, it shows the next card, one at a time, as expected due to the navigationStep=1 parameter. But after it reaches the last card, it then shows the first one, and after that the second one becomes the first in the list, and it goes back and forth when clicking the right arrow.
The expected behavior would be to roll the slider all the way back to the first card when it reaches the last one, and start the one by one stepping again.
Simulation
Create a slider-layout using the two prop values mentioned above and check it's behavior on the website.
Workaround
Avoid using both properties with those specific values together.
If the expected behavior is ultimately needed for the page, it is possible to create a custom component to achieve this result.