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

[data grid] Disable drag event handlers when row or column reorder are disabled #4857

Merged
merged 8 commits into from
May 23, 2022

Conversation

DanailH
Copy link
Member

@DanailH DanailH commented May 12, 2022

@DanailH DanailH added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user labels May 12, 2022
@DanailH DanailH self-assigned this May 12, 2022
@mui-bot
Copy link

mui-bot commented May 12, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 254.3 546.6 470 421.26 124.127
Sort 100k rows ms 496.9 914.1 838.3 789.58 151.311
Select 100k rows ms 153 247.9 185 197.1 40.203
Deselect 100k rows ms 119 241.5 146.4 175.08 49.263

Generated by 🚫 dangerJS against 56a6dc7

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.

Nice!

Copy link
Member

@m4theushw m4theushw left a 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.

@DanailH
Copy link
Member Author

DanailH commented May 18, 2022

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 GridRow component probably to avoid checks on each cell.
Regarding the bug - this is just an optimization.

@DanailH DanailH merged commit ace315b into mui:master May 23, 2022
alexfauquette pushed a commit to alexfauquette/mui-x that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGridPro] Unable to use 3rd party drag and drop over the grid
5 participants