Skip to content

Commit

Permalink
[DataGrid] Remove legacy editing API event: rowEditCommit (#12073)
Browse files Browse the repository at this point in the history
  • Loading branch information
MBilalShafi authored Feb 15, 2024
1 parent 5cf9f36 commit b797892
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 81 deletions.
8 changes: 0 additions & 8 deletions docs/data/data-grid/events/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,6 @@
"event": "MuiEvent<React.MouseEvent<HTMLElement>>",
"componentProp": "onRowDoubleClick"
},
{
"projects": ["x-data-grid", "x-data-grid-pro", "x-data-grid-premium"],
"name": "rowEditCommit",
"description": "Fired when the props of the edit input are committed.",
"params": "GridRowId",
"event": "MuiEvent<MuiBaseEvent>",
"componentProp": "onRowEditCommit"
},
{
"projects": ["x-data-grid", "x-data-grid-pro", "x-data-grid-premium"],
"name": "rowEditStart",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ See the [Direct state access](/x/react-data-grid/state/#direct-selector-access)
- When [Tree data](/x/react-data-grid/tree-data/) feature is used, the grid role is now `role="treegrid"` instead of `role="grid"`.
- The Data Grid cells now have `role="gridcell"` instead of `role="cell"`.

<!-- ### Editing
### Editing

- -->
- The `rowEditCommit` event and the related prop `onRowEditCommit` was removed. The [`processRowUpdate`](/x/react-data-grid/editing/#the-processrowupdate-callback) prop can be used in its place.

### Other exports

Expand Down
7 changes: 0 additions & 7 deletions docs/pages/x/api/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,6 @@
"describedArgs": ["params", "event", "details"]
}
},
"onRowEditCommit": {
"type": { "name": "func" },
"signature": {
"type": "function(id: GridRowId, event: MuiEvent<MuiBaseEvent>) => void",
"describedArgs": ["id", "event"]
}
},
"onRowEditStart": {
"type": { "name": "func" },
"signature": {
Expand Down
7 changes: 0 additions & 7 deletions docs/pages/x/api/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,6 @@
"describedArgs": ["params", "event", "details"]
}
},
"onRowEditCommit": {
"type": { "name": "func" },
"signature": {
"type": "function(id: GridRowId, event: MuiEvent<MuiBaseEvent>) => void",
"describedArgs": ["id", "event"]
}
},
"onRowEditStart": {
"type": { "name": "func" },
"signature": {
Expand Down
7 changes: 0 additions & 7 deletions docs/pages/x/api/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,6 @@
"describedArgs": ["params", "event", "details"]
}
},
"onRowEditCommit": {
"type": { "name": "func" },
"signature": {
"type": "function(id: GridRowId, event: MuiEvent<MuiBaseEvent>) => void",
"describedArgs": ["id", "event"]
}
},
"onRowEditStart": {
"type": { "name": "func" },
"signature": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,6 @@
"details": "Additional details for this callback."
}
},
"onRowEditCommit": {
"description": "Callback fired when the row changes are committed.",
"typeDescriptions": {
"id": "The row id.",
"event": "The event that caused this prop to be called."
}
},
"onRowEditStart": {
"description": "Callback fired when the row turns to edit mode.",
"typeDescriptions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,6 @@
"details": "Additional details for this callback."
}
},
"onRowEditCommit": {
"description": "Callback fired when the row changes are committed.",
"typeDescriptions": {
"id": "The row id.",
"event": "The event that caused this prop to be called."
}
},
"onRowEditStart": {
"description": "Callback fired when the row turns to edit mode.",
"typeDescriptions": {
Expand Down
7 changes: 0 additions & 7 deletions docs/translations/api-docs/data-grid/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,6 @@
"details": "Additional details for this callback."
}
},
"onRowEditCommit": {
"description": "Callback fired when the row changes are committed.",
"typeDescriptions": {
"id": "The row id.",
"event": "The event that caused this prop to be called."
}
},
"onRowEditStart": {
"description": "Callback fired when the row turns to edit mode.",
"typeDescriptions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,12 +761,6 @@ DataGridPremiumRaw.propTypes = {
* @param {GridCallbackDetails} details Additional details for this callback.
*/
onRowDoubleClick: PropTypes.func,
/**
* Callback fired when the row changes are committed.
* @param {GridRowId} id The row id.
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
*/
onRowEditCommit: PropTypes.func,
/**
* Callback fired when the row turns to edit mode.
* @param {GridRowParams} params With all properties from [[GridRowParams]].
Expand Down
6 changes: 0 additions & 6 deletions packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,6 @@ DataGridProRaw.propTypes = {
* @param {GridCallbackDetails} details Additional details for this callback.
*/
onRowDoubleClick: PropTypes.func,
/**
* Callback fired when the row changes are committed.
* @param {GridRowId} id The row id.
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
*/
onRowEditCommit: PropTypes.func,
/**
* Callback fired when the row turns to edit mode.
* @param {GridRowParams} params With all properties from [[GridRowParams]].
Expand Down
6 changes: 0 additions & 6 deletions packages/x-data-grid/src/DataGrid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,6 @@ DataGridRaw.propTypes = {
* @param {GridCallbackDetails} details Additional details for this callback.
*/
onRowDoubleClick: PropTypes.func,
/**
* Callback fired when the row changes are committed.
* @param {GridRowId} id The row id.
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
*/
onRowEditCommit: PropTypes.func,
/**
* Callback fired when the row turns to edit mode.
* @param {GridRowParams} params With all properties from [[GridRowParams]].
Expand Down
6 changes: 1 addition & 5 deletions packages/x-data-grid/src/models/events/gridEventLookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { GridSortModel } from '../gridSortModel';
import type { GridRowSelectionModel } from '../gridRowSelectionModel';
import type { ElementSize } from '../elementSize';
import type { MuiBaseEvent } from '../muiEvent';
import type { GridGroupNode, GridRowId } from '../gridRows';
import type { GridGroupNode } from '../gridRows';
import type { GridColumnVisibilityModel } from '../../hooks/features/columns';
import type { GridStrategyProcessorName } from '../../hooks/core/strategyProcessing';
import { GridRowEditStartParams, GridRowEditStopParams } from '../params/gridRowParams';
Expand Down Expand Up @@ -507,10 +507,6 @@ export interface GridEventLookup
params: GridRowEditStopParams;
event: MuiBaseEvent;
};
/**
* Fired when the props of the edit input are committed.
*/
rowEditCommit: { params: GridRowId; event: MuiBaseEvent };

// Focus
/**
Expand Down
6 changes: 0 additions & 6 deletions packages/x-data-grid/src/models/props/DataGridProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,12 +469,6 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
*/
onCellEditStop?: GridEventListener<'cellEditStop'>;
/**
* Callback fired when the row changes are committed.
* @param {GridRowId} id The row id.
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
*/
onRowEditCommit?: GridEventListener<'rowEditCommit'>;
/**
* Callback fired when the row turns to edit mode.
* @param {GridRowParams} params With all properties from [[GridRowParams]].
Expand Down

0 comments on commit b797892

Please sign in to comment.