Skip to content

Commit 61e5f0d

Browse files
feat: update pagination onChange
1 parent e3874bb commit 61e5f0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/evm/src/components/Pagination/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ interface PaginationProps {
3333
export const Pagination = ({
3434
itemsCount,
3535
onChange,
36+
initialPageIndex,
3637
itemsPerPageCount,
3738
className,
3839
}: PaginationProps) => {
@@ -46,7 +47,9 @@ export const Pagination = ({
4647
maxPageIndexToShow,
4748
} = usePagination({
4849
itemsCount,
49-
onChange,
50+
onChange: newPageIndex => {
51+
onChange(newPageIndex + (initialPageIndex || 0));
52+
},
5053
itemsPerPageCount,
5154
});
5255

0 commit comments

Comments
 (0)