Vuetify: [Feature Request] data table default index in the rows-per-page array

Created on 6 Dec 2018  路  3Comments  路  Source: vuetifyjs/vuetify

Problem to solve

I'd like to start my pagination with 10 rows per page. The easiest way to do this is break the order of options in my rowsPerPageItems prop. I would prefer to avoid breaking that order.

Proposed solution

Add a prop (likely to the data-iterable mixin) that allows setting defaultPagination.rowsPerPage. Currently I'm mutating defaultPagination.rowsPerPage manually on mount of the parent component.

Most helpful comment

<v-data-table :pagination.sync="pagination">

data: () => ({
  pagination: { rowsPerPage: 10 }
})

All 3 comments

<v-data-table :pagination.sync="pagination">

data: () => ({
  pagination: { rowsPerPage: 10 }
})

Something is wrong, while the v-data-table works without this (with default 5 and actions visible), as soon I only add rowsPerPage to the pagination object (which has only sortBy before), the table ends up with no data message.

I wonder if something more intuitive could be find. Pagination object and its handlers are fantastic for large amount of data but it seems missing it for static data (or < 100 records, all static or fetch during mount).

We kindly ask users to not comment on closed/resolved issues. If you believe that this issue has not been correctly resolved, please create a new issue showing the regression or reach out to us in our Discord community.

Thank you for your contribution and interest in improving Vuetify.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sebastianmacias picture sebastianmacias  路  3Comments

Webifi picture Webifi  路  3Comments

efootstep picture efootstep  路  3Comments

dohomi picture dohomi  路  3Comments

aaronjpitts picture aaronjpitts  路  3Comments