diff --git a/ui/v2.5/src/components/List/util.ts b/ui/v2.5/src/components/List/util.ts index 280a65e75f5..aa4230263fc 100644 --- a/ui/v2.5/src/components/List/util.ts +++ b/ui/v2.5/src/components/List/util.ts @@ -372,7 +372,7 @@ export function useEnsureValidPage( const totalPages = Math.ceil(totalCount / filter.itemsPerPage); if (totalPages > 0 && filter.currentPage > totalPages) { - setFilter((prevFilter) => prevFilter.changePage(1)); + setFilter((prevFilter) => prevFilter.changePage(totalPages)); } }, [filter, totalCount, setFilter]); }