Reset monitor pages when sorting

This commit is contained in:
fabiangigler committed 2026-09-23 12:37:45 +02:00
1 parent 2a45b4d46f
commit 22d0123966
1 file changed
+8 -12
+8 -12
View File
@@ -140,19 +140,15 @@ export const useMonitorListController = (config: MonitorListConfig) => {
setPage(0);
};
const setSortField = useCallback(
(value: string) => {
dispatch(setTableSortField({ value, table: config.rowsPerPageTable }));
},
[config.rowsPerPageTable, dispatch]
);
const setSortField = (value: string) => {
dispatch(setTableSortField({ value, table: config.rowsPerPageTable }));
setPage(0);
};
const setSortOrder = useCallback(
(value: "asc" | "desc") => {
dispatch(setTableSortOrder({ value, table: config.rowsPerPageTable }));
},
[config.rowsPerPageTable, dispatch]
);
const setSortOrder = (value: "asc" | "desc") => {
dispatch(setTableSortOrder({ value, table: config.rowsPerPageTable }));
setPage(0);
};
// Check for active filters
const hasActiveFilters = Boolean(