Skip to content

Commit

Permalink
[DataGrid] Cherrypick of (#16485) (#16666)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Xu <stevexugc@gmail.com>
  • Loading branch information
michelengelen and nusr authored Feb 20, 2025
1 parent 3f23a9e commit 4975600
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const getDerivedPaginationModel = (
paginationModel = paginationModelProp;
}

const validPage = getValidPage(paginationModel.page, pageCount);
const validPage = pageSize === -1 ? 0 : getValidPage(paginationModel.page, pageCount);
if (validPage !== paginationModel.page) {
paginationModel = { ...paginationModel, page: validPage };
}
Expand Down

0 comments on commit 4975600

Please # to comment.