Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect change of pagination in Vuetify?

Is there any event to check data table pagination changing numbers in vuetify? How does event update:pagination of data table work?

like image 917
Akram Kalantari Avatar asked Apr 18 '18 07:04

Akram Kalantari


1 Answers

I usually load data from a backend server and I haven't had any problems implementing the update:pagination event like this:

<v-data-table ... @update:pagination="updatePagination" />

Then I create the method to be invoked when pagination gets updated:

methods: {
  updatePagination (pagination) {
    console.log('update:pagination', pagination)
  }
}

Note that updatePagination method will be "automatically" invoked when the data-table component is mounted and, of course, after you click the pagination arrows.

like image 147
Felipe Avatar answered Sep 20 '22 21:09

Felipe