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
I'm not sure if this is done on purpose or not, but for example:
You have 10 slides in the slider
Your slidesPerView is 3, and virtual is enabled
You have 3 slides in the DOM, as the rest were removed from it by enabling virtual slides
Now, if you did swiper.destroy() or swiper.disable(), that does destroy the Swiper functionality, but there are still those three virtual slides in the DOM.
I expected the destroy function to return the hidden/deleted slides to the DOM. My use case for this was going from a slider section on desktop (with virtual slides for better performance) to a grid section on mobile (which should show all the slides in a grid).
Am I doing something wrong? Or expecting something that isn't feasible?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm not sure if this is done on purpose or not, but for example:
Now, if you did swiper.destroy() or swiper.disable(), that does destroy the Swiper functionality, but there are still those three virtual slides in the DOM.
I expected the destroy function to return the hidden/deleted slides to the DOM. My use case for this was going from a slider section on desktop (with virtual slides for better performance) to a grid section on mobile (which should show all the slides in a grid).
Am I doing something wrong? Or expecting something that isn't feasible?
Beta Was this translation helpful? Give feedback.
All reactions