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

[core] Split cell/row editing into different hooks #3219

Merged
merged 5 commits into from Jan 28, 2022

Conversation

m4theushw
Copy link
Member

One item of #3101 (comment)

This PR splits the logic to handle cell/row editing into three hooks:

  • useGridRowEditing contains only the API methods and handlers used by the row editing
  • useGridCellEditing contains only the API methods and handlers used by the cell editing
  • useGridEditing contains the common logic and calls useGridRowEditing and useGridCellEditing.

If a event was used by both row and cell editing in the past, now it's published twice. Although, only one handler is called, depending on the edit mode.

@m4theushw m4theushw added the core Infrastructure work going on behind the scenes label Nov 19, 2021
@m4theushw m4theushw self-assigned this Nov 22, 2021
Copy link
Member

@flaviendelangle flaviendelangle left a comment

Choose a reason for hiding this comment

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

It's a lot better that way !

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 24, 2021
@github-actions
Copy link

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

@flaviendelangle
Copy link
Member

flaviendelangle commented Nov 29, 2021

Good luck for the conflits 😬

@flaviendelangle flaviendelangle marked this pull request as draft December 13, 2021 14:58
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 12, 2022
@m4theushw m4theushw marked this pull request as ready for review January 13, 2022 00:18
/**
* The row editing API interface.
*/
export interface GridRowEditingApi extends GridEditingSharedApi {
Copy link
Member Author

Choose a reason for hiding this comment

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

It extends GridEditingSharedApi because I want to create a separate page for row editing and another for cell editing. That way, I can add the API widget with all methods that make sense for row editing. The same for cell editing.

@flaviendelangle flaviendelangle marked this pull request as draft January 17, 2022 13:18
@flaviendelangle flaviendelangle marked this pull request as ready for review January 18, 2022 12:30
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 18, 2022
@github-actions
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 Jan 28, 2022
@mui-bot
Copy link

mui-bot commented Jan 28, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 1,108.1 1,726.6 1,174.5 1,362.72 277.117
Sort 100k rows ms 676.1 1,133.2 1,133.2 933.06 182.079
Select 100k rows ms 175 276.7 185.6 213.4 40.372
Deselect 100k rows ms 88 196.3 125.5 124.36 37.889

Generated by 🚫 dangerJS against 4f931dd

@m4theushw m4theushw merged commit 801efe4 into mui:master Jan 28, 2022
@m4theushw m4theushw deleted the split-editing-hooks branch January 28, 2022 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants