mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +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:
parent
fbddab6178
commit
8a2186a654
1 changed files with 5 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue