Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGrid] Pass reason to onPaginationModelChange #12923

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bjackson42
Copy link

@bjackson42 bjackson42 commented Apr 26, 2024

Fixes #12897

@mui-bot
Copy link

mui-bot commented Apr 26, 2024

Deploy preview: https://deploy-preview-12923--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 12ce10c

file: [packages\x-data-grid\src\hooks\features\pagination\useGridPaginationModel.ts]
(+) updated setPaginationModel api.current.setState to set the reason, 'setPaginationModel'. this was removed in commit 7c4ba74.
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 26, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 26, 2024
@zannager zannager added the component: data grid This is the name of the generic UI component, not the React module! label Apr 29, 2024
Copy link
Member

@cherniavskii cherniavskii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@cherniavskii cherniavskii changed the title Bugfix/12897 - [data grid] set details reason [DataGrid] Pass reason to onPaginationModelChange May 10, 2024
@cherniavskii cherniavskii added regression A bug, but worse feature: Pagination Related to the data grid Pagination feature labels May 10, 2024
file: [packages\x-data-grid\src\hooks\features\pagination\useGridPaginationModel.ts]
(+) updated setPaginationModel api.current.setState to set the reason, 'setPaginationModel'. this was removed in commit 7c4ba74.
@DungTiger
Copy link

@cherniavskii Seems no activity here, I just created a new PR here
#13959
Which contains the fix, your comment and a type fix.

@bjackson42
Copy link
Author

I haven't had time to revisit, thank you for the reminder. I suggest that we merge your recommended changes into this branch to save on PRs.

file: [packages\x-data-grid\src\hooks\features\pagination\useGridPaginationModel.ts]
(+) added stateRestorePreProcessing message to setState in stateRestorePreProcessing function.

file: [packages\x-data-grid\src\models\props\DataGridProps.ts]
(+) updated typing for onPaginationModelChange callback.
@bjackson42
Copy link
Author

@DungTiger I believe I have integrated your changes into my branch and PR. Thank you for the support! Let me know if you have thoughts or questions.

@DungTiger
Copy link

@bjackson42 I think you need to rebase your changes on latest next branch. It appears you have more changes (and commits) than needed

@bjackson42
Copy link
Author

Thank you, hopefully I didn't goof that. I followed the instructions that were provided for making a PR and checked what I committed after the push. I see the changes that you and I have made (2 files), one that @cherniavskii made (1 file), and it looks like another slight update made it into the change list. Perhaps @cherniavskii can verify that everything is sanitized?

@dhrumit9
Copy link

Hello, this looks quite stale. Any updates on getting this merged ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Pagination Related to the data grid Pagination feature regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] onPaginationModelChange details property is not defined / useful in v7+
8 participants