You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when we pass props :virtual="true" and :loop="true" with small amount of slides, we get duplicates due to the logic of creating an array of rendered elements. If this amount is less than or equal to 3, logic still tries to create an array of 4 elements, which leads to one element always be a duplicate. Hence we receive warning in console, and DOM tree starts to grow with each swipe
Expected Behavior
No duplicate warnings in console
Actual Behavior
Warning about duplicates when sliding left/right and continuosly growing list of DOM elements representing slides
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/devbox/swiper-vue-virtual-slides-forked-v5kyft
Bug description
when we pass props
:virtual="true"
and:loop="true"
with small amount of slides, we get duplicates due to the logic of creating an array of rendered elements. If this amount is less than or equal to 3, logic still tries to create an array of 4 elements, which leads to one element always be a duplicate. Hence we receive warning in console, and DOM tree starts to grow with each swipeExpected Behavior
No duplicate warnings in console
Actual Behavior
Warning about duplicates when sliding left/right and continuosly growing list of DOM elements representing slides
Swiper version
11.1.3
Platform/Target and Browser Versions
Chrome 125.0.6422.77
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: