-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
81bff0d
to
f037781
Compare
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.
It's a lot better that way !
packages/grid/_modules_/grid/hooks/features/editRows/useGridRowEditing.ts
Outdated
Show resolved
Hide resolved
packages/grid/_modules_/grid/hooks/features/editRows/useGridRowEditing.ts
Outdated
Show resolved
Hide resolved
packages/grid/_modules_/grid/hooks/features/editRows/useGridRowEditing.ts
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Good luck for the conflits 😬 |
1983774
to
4c5c780
Compare
/** | ||
* The row editing API interface. | ||
*/ | ||
export interface GridRowEditingApi extends GridEditingSharedApi { |
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.
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.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
These are the results for the performance tests:
|
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 editinguseGridCellEditing
contains only the API methods and handlers used by the cell editinguseGridEditing
contains the common logic and callsuseGridRowEditing
anduseGridCellEditing
.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.