[Vuejs]-Slick Carousel's height drops to zero after changing routes AND resizing window

0👍

Ok, got it work. Found the right slick property/method in the source code of its Github Repo:

updated(){
    window.homeslick = $('#home_slick_slider .inner-container').slick({
            dots: true,
            lazyLoad: "ondemand",
            slidesToShow: 1,
            slidesToScroll: 1,
            prevArrow: false,
            nextArrow: false,
            fade: false,
            adaptiveHeight: true,
        });
},
activated(){
    if(window.homeslick){
        homeslick.slick("refresh");
    }
}

Don’t understand why they didn’t described the existence and syntax of this method properly in the doc file…

Leave a comment