swiper icon indicating copy to clipboard operation
swiper copied to clipboard

dynamicBullets is not refreshing correctly on breakpoint

Open smartfox87 opened this issue 5 years ago • 8 comments

  • [x] bug

Swiper 5.3.8 Swiper 6.0.4

samle codepen https://codepen.io/smartfox87/pen/yLewmJK

Video Sample https://take.ms/2Qv3f

Windows 10 Google Chrome last version

smartfox87 avatar Jul 25 '20 07:07 smartfox87

I found a solution

breakpoints: { 320: { slidesPerView: 1, slidesPerGroup: 1, pagination: { dynamicBullets: true, dynamicMainBullets: 7, }, }, 430: { slidesPerView: 2, slidesPerGroup: 2, pagination: { dynamicBullets: false, }, }, }, on: { breakpoint: function (swiper) { if (swiper.params.pagination.dynamicBullets) { swiper.pagination.init() } else { setTimeout(function () { swiper.pagination.el.style.width = '100%' swiper.pagination.el.classList.remove('swiper-pagination-bullets-dynamic') }) } }, }

smartfox87 avatar Jul 25 '20 09:07 smartfox87

This problem doesn't seem to be restricted to dynamicBullets but also normal pagination. The number of bullets doesn't change when the number of slidesPerView & slidesPerGroup changes according to a breakpoint.

warudin avatar Aug 07 '20 14:08 warudin

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.

stale[bot] avatar Feb 04 '21 03:02 stale[bot]

I have the same issue on v6.4.10 when assigning an HTML element to pagination.el

mutoo avatar Feb 04 '21 05:02 mutoo

Same problem here. I need to call swiper.pagination.update() after a resize because the size and position of the pagination is not calculated again.

ChillerPerser avatar Apr 27 '21 12:04 ChillerPerser

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.

stale[bot] avatar Nov 25 '21 20:11 stale[bot]

Same Issue in Swiper 8.0.6

pagination properties dont change on resize, only on reload

mafudelaptu avatar Feb 16 '22 07:02 mafudelaptu

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.

stale[bot] avatar Sep 21 '22 04:09 stale[bot]

Swiper 8.4.6, pagination bullets count is not updating on resize.

andreistez avatar Mar 03 '23 11:03 andreistez

The issue is still present in Swiper 9 and 10. Example https://codesandbox.io/s/swiper-responsive-breakpoints-forked-swhpdq Make sure the preview shows 3 slides and refresh the preview if needed. example.txt

Then it shows 5 bullets instead of 3

tmmtech avatar Sep 11 '23 08:09 tmmtech

I am have similar issue in swiper 10.2.0: breakpoints with pagination don't work. I can't disable dynamic bullets on breakpoint, if i resize screen. Only work after full SPA page reloading.

IgnisVulpe avatar Sep 14 '23 16:09 IgnisVulpe

Issue is closed because of outdated/irrelevant/not actual/needed more information/inactivity.

If this issue is still actual and reproducible for latest version of Swiper, please create new issue and fill the issue template correctly:

  • Clearly describe the issue including steps to reproduce when it is a bug.
  • Make sure you fill in the earliest version that you know has the issue.
  • Provide live link or JSFiddle/Codepen or website with issue

nolimits4web avatar Oct 24 '23 12:10 nolimits4web