swiper
swiper copied to clipboard
Swiper Angular loop mode cannot be turned off
Check that this is really a bug
- [X] I confirm
Reproduction link
https://github.com/pfei5/angular-swiper-loop-bug
Bug description
Say I initialize Swiper for Angular with multiple slides and 'loop' mode turned on. If I then reduce the number of slides to 1, swiper will continue to loop 3 slides that are identical, the one expected slide and the 2 duplicate slides on either end.
Expected Behavior
I expect swiper to remove duplicate slides when I reduce the number of slides to 1 and set the SwiperComponent's 'loop' property to 'false'.
Actual Behavior
Swiper loops 3 identical slides instead of resting on the single provided slide.
Swiper version
7.3.1
Platform/Target and Browser Versions
macOS 11.5.2 Chrome 96
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- [X] Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- [ ] I'm willing to open a PR
This is not Angular related issue. Also seems to me this is the way it should work. @nolimits4web thoughts?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@vltansky I disagree. Reducing the number of slides to 1 and turning off loop mode should not loop 3 identical slides, IMHO.
New Swiper v9 doesn't have Angular components anymore, it is recommended to use new Swiper Web Components instead.