mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Reset page offset when changing page size (#7994)
- Prevents table rendering an "empty" page
This commit is contained in:
parent
881220cdb3
commit
d1c8354859
@ -590,6 +590,7 @@ export function InvenTreeTable<T = any>({
|
|||||||
// pagination refresth table if pageSize changes
|
// pagination refresth table if pageSize changes
|
||||||
function updatePageSize(newData: number) {
|
function updatePageSize(newData: number) {
|
||||||
tableState.setPageSize(newData);
|
tableState.setPageSize(newData);
|
||||||
|
tableState.setPage(1);
|
||||||
tableState.refreshTable();
|
tableState.refreshTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user