nolimits4web / swiper

Most modern mobile touch slider with hardware accelerated transitions
https://swiperjs.com
MIT License
39.69k stars 9.74k forks source link

slidesOffsetAfter does not work with grid.rows > 1 #7537

Open danielkorte opened 4 months ago

danielkorte commented 4 months ago

Check that this is really a bug

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

Would you like to open a PR for this bug?

nolimits4web commented 4 months ago

t0ggles-create swiper

t0ggles[bot] commented 4 months ago

Task nolimits4web/SWIPER-134 was created

t0ggles task SWIPER-134

Roye7777777 commented 1 month ago

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