Skip to content

Commit

Permalink
[DataGrid] Remove legacy editing API event: rowEditCommit (#12087)
Browse files Browse the repository at this point in the history
  • Loading branch information
MBilalShafi authored Apr 4, 2024
1 parent acf7833 commit e54ca31
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 80 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 @@ -423,7 +423,7 @@ Most of this breaking change is handled by `preset-safe` codemod but some furthe
/>
```
- The `editCellPropsChange` event was removed. If you still need it please file a new issue so we can propose an alternative.
- The `cellEditCommit` event was removed and the `processRowUpdate` prop can be used in place. More information, check the [docs](https://mui.com/x/react-data-grid/editing/#server-side-persistence) section about the topic.
- The events `cellEditCommit` and `rowEditCommit` and related props were removed. The `processRowUpdate` prop can be used in place. More information, check the [docs](https://mui.com/x/react-data-grid/editing/#server-side-persistence) section about the topic.
- The `editRowsModel` and `onEditRowsModelChange` props were removed. The [`cellModesModel`](https://mui.com/x/react-data-grid/editing/#controlled-mode) or [`rowModesModel`](https://mui.com/x/react-data-grid/editing/#controlled-mode) props can be used to achieve the same goal.
- The `GridEditRowsModel` type was removed.
- The following API methods were removed:
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 @@ -448,13 +448,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 @@ -407,13 +407,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 @@ -320,13 +320,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 @@ -478,13 +478,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 @@ -440,13 +440,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 @@ -338,13 +338,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 @@ -736,12 +736,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/grid/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -669,12 +669,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/grid/x-data-grid/src/DataGrid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,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
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 @@ -506,10 +506,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/grid/x-data-grid/src/models/props/DataGridProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,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 e54ca31

Please sign in to comment.