[Vuejs]-Loading bootstrap-multiselect dynamically in vueJs loop

-1👍

Try this:

http://jsfiddle.net/Lw5us5y3/5/

I’m calling the refresh method of multiselect after the updated vue lifecycle.

$(function() {
    $('.mult').multiselect();
});

new Vue({
  el: '#app',
  data: {
    params: '',
    message: 'Test'
  },
  methods: {
    load: function() {
        this.params = [{value: 'cheese'},
        {value: 'tomatoes'}]
    }
  },
  updated: function(){
    $('.mult').multiselect('refresh');
  }
})

Leave a comment