Skip to content

Commit

Permalink
Fix: Table pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
subraAntoine committed Jul 18, 2024
1 parent 3a8d7e1 commit 8925a67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/haring-react-table/src/Components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,12 @@ export function Table<Data extends Record<string, unknown>>(

function handleItemsPerPageChange(value: number): void {
setPageSize(value);
paginationProps?.onItemsPerPageChange?.(value);
}

function handlePageChange(value: number): void {
setPageIndex(value - 1);
paginationProps?.onPageChange?.(value - 1);
}

return (
Expand Down

0 comments on commit 8925a67

Please sign in to comment.