swiper
swiper copied to clipboard
slidesOffsetAfter does not work with grid.rows > 1
Check that this is really a bug
- [X] I confirm
Reproduction link
https://codesandbox.io/p/sandbox/swiper-grid-forked-kx7t38
Bug description
For my grid.rows = 2
swipers, the slidesOffsetAfter
setting has no effect.
Issue #7298 may be related, but that may only apply to the slidesOffsetBefore
setting because I have a non-grid swiper where slidesOffsetAfter
works just fine. Not sure about the before setting.
Issue #5633 may be related too, but that issue is attempting to remove space at the end. It also uses slidesPerView: 'auto'
unlike this issue which uses slidesPerView: 3
.
Expected Behavior
slidesOffsetAfter
should add space after the slides.
Actual Behavior
No space is added.
Swiper version
11.1.3
Platform/Target and Browser Versions
All modern browsers and OSs
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
t0ggles-create swiper
Interesting to add: slidesOffsetBefore
will be applied as expected when grid.rows
has a value greater than 1. It is just slidesOffsetAfter
that will not be applied.
https://codepen.io/roye7777777/pen/BagYqKR