[DataGrid] Standardize/Reconcile all event handlers and params #1301
Labels
breaking change
component: data grid
This is the name of the generic UI component, not the React module!
discussion
new feature
New feature or request
Milestone
params
of the entity it comes from, or with the params relative to its actionie
onCellClick
hasGridCellParams
And
onFilterModelChange
hasGridFilterModelParams
Getting params, can be done using apiRef
apiRef.current.getCellParams(id: GridRowId, field: string): GridCellParams
;apiRef.current.getColumnHeaderParams(field: string): GridColumnHeaderParams
;Then it should have the event as a second parameter.
ie
options.onColumnReorder(params: GridColumnParams, event?: React.SyntheticEvent);
Imagine I want to log the cell that users are trying to edit. I could subscribe to the double click event but there are many different ways of getting into edit mode, keyboard, calling the api directly, and one could do it on click...
With granular events, I can easily hook into the event and achieve the above.
The text was updated successfully, but these errors were encountered: