mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-15 04:32:22 +00:00
[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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user