Skip to content

Commit

Permalink
Set page with different API
Browse files Browse the repository at this point in the history
  • Loading branch information
arminmeh committed Jan 10, 2025
1 parent 969a6d8 commit 25fd944
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describeSkipIf(isJSDOM)('<DataGridPro /> - Data source', () => {
it('should re-fetch the data on pagination change', async () => {
render(<TestDataSource />);
expect(fetchRowsSpy.callCount).to.equal(1);
apiRef.current.setPaginationModel({ page: 1, pageSize: 10 });
apiRef.current.setPage(1);
await waitFor(() => {
expect(fetchRowsSpy.callCount).to.equal(2);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describeSkipIf(isJSDOM)('<DataGridPro /> - Data source tree data', () => {
await waitFor(() => {
expect(fetchRowsSpy.callCount).to.equal(1);
});
apiRef.current.setPaginationModel({ page: 1, pageSize: 10 });
apiRef.current.setPage(1);
await waitFor(() => {
expect(fetchRowsSpy.callCount).to.equal(2);
});
Expand Down

0 comments on commit 25fd944

Please sign in to comment.