We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
data-swiper-slide-index
realIndex
1 parent 332f5c7 commit bd957f8Copy full SHA for bd957f8
1 file changed
src/core/update/updateActiveIndex.mjs
@@ -83,8 +83,12 @@ export default function updateActiveIndex(newActiveIndex) {
83
84
// Get real index
85
let realIndex;
86
- if (swiper.virtual && params.virtual.enabled && params.loop) {
87
- realIndex = getVirtualRealIndex(activeIndex);
+ if (swiper.virtual && params.virtual.enabled) {
+ if (params.loop) {
88
+ realIndex = getVirtualRealIndex(activeIndex);
89
+ } else {
90
+ realIndex = activeIndex;
91
+ }
92
} else if (gridEnabled) {
93
const firstSlideInColumn = swiper.slides.find((slideEl) => slideEl.column === activeIndex);
94
let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);
0 commit comments