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
+6 -10
+6 -10
View File
@@ -140,19 +140,15 @@ export const useMonitorListController = (config: MonitorListConfig) => {
setPage(0); setPage(0);
}; };
const setSortField = useCallback( const setSortField = (value: string) => {
(value: string) => {
dispatch(setTableSortField({ value, table: config.rowsPerPageTable })); dispatch(setTableSortField({ value, table: config.rowsPerPageTable }));
}, setPage(0);
[config.rowsPerPageTable, dispatch] };
);
const setSortOrder = useCallback( const setSortOrder = (value: "asc" | "desc") => {
(value: "asc" | "desc") => {
dispatch(setTableSortOrder({ value, table: config.rowsPerPageTable })); dispatch(setTableSortOrder({ value, table: config.rowsPerPageTable }));
}, setPage(0);
[config.rowsPerPageTable, dispatch] };
);
// Check for active filters // Check for active filters
const hasActiveFilters = Boolean( const hasActiveFilters = Boolean(