-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[DataGrid] Fix apiRef not being passed on onCellClick params #17335
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
Conversation
Thanks for adding a type label to the PR! 👍 |
Deploy preview: https://deploy-preview-17335--material-ui-x.netlify.app/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
packages/x-data-grid/src/hooks/features/rows/useGridParamsApi.ts:78
- Replacing 'null as any' with 'apiRef.current' should correctly pass the API instance to the cell event parameters. Verify that apiRef.current is available at this point to avoid potential runtime issues.
api: apiRef.current,
packages/x-data-grid-pro/src/tests/events.DataGridPro.test.tsx:126
- The test now passes the API reference as expected; ensure that this change consistently reflects the updated behavior of the production code.
api: apiRef.current,
ping @michelengelen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cherry-pick PRs will be created targeting branches: v7.x |
closes #16866