Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Known issues
Unexpected behavior in slider layout when using the props infinite=true and navigationStep=1
Unexpected behavior in slider layout when using the props infinite=true and navigationStep=1
ID: 462895
Backlog
Published on 2/1/2022
Last update on 11/25/2022

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.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback