nolimits4web / swiper

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

Updating `slidesPerView` and `breakpoints.*.slidesPerView` does not correctly refresh the slider #7596

Open Prinzhorn opened 4 months ago

Prinzhorn commented 4 months ago

Check that this is really a bug

Reproduction link

https://codesandbox.io/p/sandbox/swiper-slides-per-view-forked-cl2tdw?file=%2Findex.html%3A30%2C8

Bug description

When updating slidesPerView and breakpoints.*.slidesPerView the slider will be in an inconsistent state and only "fixes" itself by resizing the viewport to the breakpoint and back.

Screencast from 2024-07-01 10-15-30.webm

Expected Behavior

No response

Actual Behavior

No response

Swiper version

swiper@11

Platform/Target and Browser Versions

Ubuntu 23.10 with both Firefox 127.0.2 and Chromium 126.0.6478.114

Validations

Would you like to open a PR for this bug?

samuel-clara commented 4 months ago

Same here!

ArianHamdi commented 3 months ago

Same here Swiper doesn't update when slidesPerView changes

RIPPERO commented 1 month ago

Same here

pow44feet commented 1 month ago

here's solution https://github.com/nolimits4web/swiper/issues/3539#issuecomment-995815717