Menu
Feedback
Start here

Known issues

Known issues
Unexpected behavior in slider layout when using the props infinite=true and navigationStep=1
Store Framework
ID: 462895
Backlog
Published on2/1/2022
Last updated on11/25/2022
1 min read

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
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX Community
Join our community
Request VTEX support
For personalized assistance, contact our experts
Open a support ticket
GitHubDeveloper PortalCommunityFeedback