Skip to content

Commit

Permalink
feat: Fix pagination issue
Browse files Browse the repository at this point in the history
Make sure the correct page is rendered while changing pages in the table.
  • Loading branch information
LuukvH committed Aug 13, 2023
1 parent c9a2615 commit 3987551
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/web/src/features/children/ChildrenTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const columns: GridColDef[] = [

export const ChildrenTable = () => {
const [paginationModel, setPaginationModel] = useState<GridPaginationModel>({
page: 1,
page: 0,
pageSize: 10,
});

const { data, isLoading, isFetching } = useGetAllChildren(
{
PageNumber: paginationModel.page,
PageNumber: paginationModel.page + 1,
PageSize: paginationModel.pageSize,
},
{ query: { keepPreviousData: true } }
Expand Down

0 comments on commit 3987551

Please sign in to comment.