-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] Disable drag event handlers when row or column reorder are disabled #4857
Conversation
These are the results for the performance tests:
|
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.
Nice!
packages/grid/x-data-grid-pro/src/components/GridRowReorderCell.tsx
Outdated
Show resolved
Hide resolved
packages/grid/x-data-grid-pro/src/components/GridRowReorderCell.tsx
Outdated
Show resolved
Hide resolved
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.
Since the issue in #4841 was already fixed in the latest release according to #4841 (comment), is there another CodeSandbox we can see the bug here, or a test case?
Based on the title of this PR, if we want to disable all event handlers, then we must disable them in the cell too:
onDragEnter={publish('cellDragEnter', onDragEnter)} |
These event handlers are used to allow to drop the column header inside any cell of the column.
@m4theushw I agree that it's a good idea to remove those as well - I forgot about them. The check should be in the |
Fixes #4841
Codesandbox: https://codesandbox.io/s/billowing-moon-4dw6h8