[v3] Loading next lazy swiper slide after current one is deleted


#1

I have F7-based app with swiper. Each slide contains lazy-loading image. When I delete current slide using swiper.removeSlide(slideIndex), it disappears as expected, and next slide appears. But an image in that next slide is not loading (but preloader is shown).

Am I doing something wrong? How can I force next image to load? swiper.update() does not help.

Sample app can be found here: https://github.com/contfedorov/f7-issues/tree/swiper_remove_lazy_slide

My Framework7 version is 3.6.5.


#2

Just add: galleryTop.lazy.load()

    $$("#photoBrowserDeleteButton").click(function () {
        var slideIndex = galleryTop.realIndex;
        galleryTop.removeSlide(slideIndex);
        // Add next line
        galleryTop.lazy.load()
    });

i test it and it works fine on chrome


#3

@pvtallulah
Thanks, this helped.

@nolimits4web
As far as I understood, swiper.lazy.load() should be loaded on transitionEnd event. But it does not in my case. Is it bug or feature?