[Vuejs]-Vue element not loading on hidden modal

1👍

Figured this one out finally. Intercepted the modal ‘onShow’ and re-rendered the html content using Vue. If there is a better way I’d love to hear it still.

$('#foundModal').modal({
    onShow: function() {
        const dropHtml = $('#map-container').html();
        let res = window.Vue.compile(dropHtml);
        new Vue({
            render: res.render,
            staticRenderFns: res.staticRenderFns
        }).$mount('#map-container');
    }
}).modal('show');

Leave a comment