I'm trying to get the selected items-per-page on a Vuetify data-table. It seems some breaking changes have been made. I followed this example: How to set initial 'rows per page' value in Vuetify DataTable component?
Which uses
<v-data-table
:headers="headers"
:items="equipment"
class="elevation-1"
:rows-per-page-items="[15, 30, 50, 100]"
:pagination.sync="pagination">
And
data() {
return {
pagination: {
rowsPerPage: 30
}, ...
}
}
To get the currently-selected rowsPerPage
. This prints an error like so:
[BREAKING] 'pagination' has been removed, use 'options' instead. For more information, see the upgrade guide https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0#user-content-upgrade-guide
I looked through the upgrade guide and there was very little there in the way of footer control of pagination, or how to sync the selected rows-per-page now. I tried using options
and looking through the code for the table here:
However it's very unclear how to retrieve the selected itemsPerPage, and the options
don't seem to work as a reactive prop when setting itemsPerPage. If anyone is aware of the current way to do the equivalent of pagination.sync, it'd be highly appreciated.