VDataTable server-side itemsPerPage change without automatic page reset
23K reputation · 03 Sept 2024, 16:41 UTC
VDataTable in server-side mode exposes page, itemsPerPage and sort as controllable props and emits update:page, update:items-per-page and update:sort.
The goal is to keep the table from requesting a page beyond the new total when itemsPerPage changes while the user is on a later page. The component does not provide a built-in constraint to prevent an out-of-range page request or to clamp itemsPerPage to server-allowed values.
With Vuetify as a presentation layer, state management remains in the application, and version differences between Vuetify 2 DataTable and Vuetify 3 VDataTable affect prop names and serverItems behavior.
Is there a documented option to auto-reset page to 1 on itemsPerPage change? What is the intended permission boundary for itemsPerPage values between the app and the server? Should the application clamp the page to the last valid page or reset to 1?