Vuetify: [Feature Request] VDataTable: hide rowsPerPage select, if only one option is provided

Created on 8 Nov 2017  路  10Comments  路  Source: vuetifyjs/vuetify

New Functionality

Hide the rowsPerPage select, by not rendering it, if only a 1-item array is provided via rowsPerPageItems prop

Improvements

No custom styling needed

Bugs or Edge Cases it Helps Avoid

Removes UI clutter, if the feature of adjusting page size isnt used or desired

Most helpful comment

rows-per-page-text=""
:rows-per-page-items="[]"

All 10 comments

This can easily be achieved with the hide-actions prop.

https://codepen.io/anon/pen/MObpVz

hide-actions also skips the pagination, which isnt what this feature request was about

Pagination is just as superfluous as rows per page when there's only one item in the array.

If you want to hide only rows per page, apply a custom css class to data table when array is only one item that sets rows per page element to display: none.

He meant only one item in rows-per-page-items array, not items array, and i think it's not a bad idea to hide rows per page in this case

Oh. I guess I totally misunderstood the whole thing then :D

tyvm

rows-per-page-text=""
:rows-per-page-items="[]"

In case you get this error:
[Vuetify] The prop 'rows-per-page-items' can not be empty in "v-data-table"

Do: :rowsPerPageItems="[10]"

Please do not post on old closed issues.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Webifi picture Webifi  路  3Comments

efootstep picture efootstep  路  3Comments

dschreij picture dschreij  路  3Comments

sebastianmacias picture sebastianmacias  路  3Comments

milleraa picture milleraa  路  3Comments