title: VueJS: changing number of paginate values?
body: <p>My problem is: I'm trying to do a pagination function to my datatable, it works fine but when I change the limit of items in my table, the total of pages doesn't update. How can I proceed? I have this filter:</p>
  
  <pre><code>    filters: {
          paginate: function(list) {
              this.resultCount = this.movimientos.length;
              if (this.currentPage &gt;= this.totalPages) {
                this.currentPage = Math.max(0, this.totalPages - 1);
              }
              var index = this.currentPage * this.upperLimit;
              return this.movimientos.slice(index, index + this.upperLimit);
          }
      } 
  </code></pre>
  
  <p>And here I'm calculating the number of pages</p>
  
  <pre><code>computed: {
      totalPages: function() {
           return Math.ceil(this.resultCount / this.itemsPerPage);
      }
  },
  methods: {
       setPage: function(pageNumber) {
           this.currentPage = pageNumber;
  },
  
  &lt;div v-for="pageNumber in totalPages" class="c-paginacao__select"&gt;
       &lt;a href="#" v-on:click.prevent="setPage(pageNumber)"&gt;
          &lt;span class="active"&gt;{{pageNumber+1}}&lt;/span&gt;
       &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>