Swiper on sheet modal?

Hey all! I’ve had a hunt around but can’t find the answer. Is there a known issue where the swiper not work on a sheet modal? Is there a work around for this?

Yes, it happens because I think you initialized/created Swiper when modal was hidden. Swipers created automatically with “swiper-init” class don’t have such issues as they can track such case.

So in this case, you need to call swiper’s update method on sheet modal open, something like:

var swiper = app.swiper.create(....);

var sheetModal = app.sheet.create(...);

sheetModal.on('open', () => {
  swiper.update();
})

Amazing! Thanks (as always) @nolimits4web! :slight_smile:

1 Like