[Fix] Reset page to 1 on filter reset and use pageSize param in fallbacks

Add setCurrentPage(1) to handleFilterReset in the hook so page resets
regardless of which component consumes it. Replace hardcoded page_size: 50
in empty-state fallbacks with the pageSize parameter for consistency.
This commit is contained in:
Ryan Crabbe
2026-03-28 16:19:03 -07:00
parent fbddab6178
commit 8a2186a654
@@ -174,7 +174,7 @@ export function useLogFilterLogic({
data: [],
total: 0,
page: 1,
page_size: 50,
page_size: pageSize,
total_pages: 0,
};
}
@@ -242,7 +242,7 @@ export function useLogFilterLogic({
data: [],
total: 0,
page: 1,
page_size: 50,
page_size: pageSize,
total_pages: 0,
};
}
@@ -294,6 +294,9 @@ export function useLogFilterLogic({
// Cancel any in-flight debounced search
debouncedSearch.cancel();
// Reset to first page so the unfiltered view starts at page 1
setCurrentPage(1);
};
return {