Swiper does not call slideChange when slidesPerView: 'auto'
See original GitHub issueThis is a (multiple allowed):
-
bug
-
enhancement
-
feature-discussion (RFC)
-
Swiper Version: 4.4.2.
-
Platform/Target and Browser Versions: Ubuntu 18.04; Chrome 70.0.3538.77 (Official Build) (64-bit).
-
Live Link or JSFiddle/Codepen or website with isssue: DEMO.
What you did
Just try to swipe slides and you will see that slideChange
event is not triggered. Using this event I want to get realIndex
. Just want to draw your attention that there are 3 slides but just 2 nav bullets (in my case I do not care what realIndex
can be, because I can simply do ±1, but what I really need is a workable slideChange
event).
Expected Behavior
Swiping of slides should trigger slideChange
event in order to let me get realIndex
.
Actual Behavior
Swiping of slides does not trigger slideChange
event.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Angular swiperJS slideChange event does not work when ...
i added a method called when slideChange,this method only logs the active index,and it works perfect. but then i added: [initialSlide]="2".
Read more >Swiper API
This param intended to be used only with slidesPerView: 'auto' and slidesPerGroup: 1 . When enabled, it will skip all slides in view...
Read more >swiper active slide | The AI Search Engine You Control
From looking at the classes, the centered slide doesn't actually look like the ... Currently, multirow Swiper is not compatible with slidesPerView:'auto', ...
Read more >Top 5 swiper Code Examples - Snyk
swiper -container', { // Optional parameters direction: 'horizontal', loop: false, slidesPerView: "auto", noSwiping: true, noSwipingClass: "no-swipe", // ...
Read more >View Raw - UNPKG
It doesn't support all of Swiper's features, but potentially should bring a much ... slidesPerView: 'auto' is currently not compatible with multirow mode, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In my case, I also use
slidesPerView: 'auto'
and I get theslideChange
,slideChangeTransitionStart
, andslideChangeTransitionEnd
events except when going to the last slide. When I comment out theslidesPerView
option (leaving it to the default value), all those events are triggered correctly for all slides.I am experiencing the same issue and
centeredSlides: true
, though it fixes it, is not an option for me because I also need the slides to be left aligned. Did anybody find a solution? 🙏