title: Vue Js: selectpicker(''refresh") not working
body: <pre><code> $('.selectpicker').selectpicker('refresh')
  </code></pre>
  
  <p>This is done to initialize the selectpicker. When I run this is in console of chrome.. the dropdown list appears. So, in vuejs I added this code in mount(). But nothing is happening.. I have asked another question regarding the same and did not got an answer. Is there any way to initialize the same. My front end is html and vuejs and backend in python Django.. I am stuck or last two days and did not get anything new. Is there any way to initialize the same?</p>
  
  <p>My html code is</p>
  
  <pre><code>&lt;form action="" class="form-inline" onsubmit="return false;" method="post" id="categories"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-xs-6"&gt;
          &lt;select id="lunchBegins" class="selectpicker" data-live-search="true" data-live-search-style="begins" title="Select Your City" v-model="category" name="category"&gt;
              &lt;option v-for="post in articles" v-bind:value="post.name"&gt;{{post.name}}&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
      &lt;div class="col-xs-6"&gt;
          &lt;select id="basic" class="selectpicker show-tick form-control" v-model="subcategory" name="subcategory"&gt;
              &lt;option v-for="so in services" v-bind:value="so.name"&gt;{{so.name}}&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My vue js code is</p>
  
  <pre><code> &lt;script&gt;
  searchContent = new Vue({
          el: "#searchContent",
          data: {
            vector: {}
          }
        });
  categories = new Vue({
      el: '#categories',
      data: {
          articles: [],
          services: [],
          category: 0,
          subcategory: 0,
          businessName: 0,
          district: 0,
          content: false
      },
        watch: {
             subcategory: function(e) {
              this.prefetch();
            },
            businessName: function(e) {
              this.prefetch();
            },
            district: function(e) {
              this.prefetch();
            },
             category: function() {
              var self = this;
              self.subcategory = 0;
              $.ajax({
                url: "https://n2s.herokuapp.com/api/post/get_all_services/",
                data: {
                  'service': self.id
                },
                type: "POST",
                dataType: "JSON",
                success: function(e) {
                console.log('Loading services');
                console.log(self.category);
                let categoryIdArray = self.articles.filter(x=&gt;x.name==self.category);
                  console.log(categoryIdArray);
                  self.services = e.filter(x=&gt;x.cat_id==categoryIdArray[0].cat_id);
                   console.log(self.services);
                  self.prefetch();
  
                }
              });
            },
        },
      mounted: function() {
  
  
  
          var vm = this;
  this.$nextTick(function () {
       $('.selectpicker').selectpicker('refresh')
    });
          $.ajax({
              url: "https://n2s.herokuapp.com/api/post/get_all_category/",
              method: "GET",
              dataType: "JSON",
              success: function(e) {
  
                      console.log(e); 
                   vm.articles = e;
                  console.log(vm);
              },
          });
      },
  
            methods: {
            prefetch: function() {
              var filter = {};
              filter['category'] = this.category;
              filter['subcategory'] = this.subcategory;
              filter['businessName'] = this.businessName;
               filter['district'] = this.district;
              if (this.content !== false)
                this.content.abort()
              this.content = $.ajax({
                'url': 'https://n2s.herokuapp.com/api/post/filter/',
                data: filter,
                dataType: "JSON",
                type: "POST",
                success: function(e) {
  
                   window.searchContent.vector = e.data;
                  console.log(e);
                }
              })
            }
          }
  
  })
  &lt;/script&gt;
  </code></pre>