diff --git a/src/CAREUI/misc/PaginatedList.tsx b/src/CAREUI/misc/PaginatedList.tsx index 3b699177d9e..899febdaaf3 100644 --- a/src/CAREUI/misc/PaginatedList.tsx +++ b/src/CAREUI/misc/PaginatedList.tsx @@ -42,11 +42,15 @@ export default function PaginatedList({ perPage = DEFAULT_PER_PAGE_LIMIT, ...queryOptions }: Props) { + const [currentPage, setPage] = useState(1); const query = useQuery(route, { ...queryOptions, - query: { ...queryOptions.query, limit: perPage }, + query: { + ...queryOptions.query, + limit: perPage, + offset: (currentPage - 1) * perPage, + }, }); - const [currentPage, setPage] = useState(1); const items = query.data?.results ?? [];