Reset page offset when changing page size (#7994)

- Prevents table rendering an "empty" page
This commit is contained in:
Oliver 2024-08-26 15:18:46 +10:00 committed by GitHub
parent 881220cdb3
commit d1c8354859
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -590,6 +590,7 @@ export function InvenTreeTable<T = any>({
// pagination refresth table if pageSize changes
function updatePageSize(newData: number) {
tableState.setPageSize(newData);
tableState.setPage(1);
tableState.refreshTable();
}