diff --git a/docs/data/data-grid/events/events.json b/docs/data/data-grid/events/events.json index 0ff032511df7..a4277ebbd834 100644 --- a/docs/data/data-grid/events/events.json +++ b/docs/data/data-grid/events/events.json @@ -300,14 +300,6 @@ "event": "MuiEvent>", "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", - "componentProp": "onRowEditCommit" - }, { "projects": ["x-data-grid", "x-data-grid-pro", "x-data-grid-premium"], "name": "rowEditStart", diff --git a/docs/data/migration/migration-data-grid-v6/migration-data-grid-v6.md b/docs/data/migration/migration-data-grid-v6/migration-data-grid-v6.md index 80cd8e720821..bf363d6181cb 100644 --- a/docs/data/migration/migration-data-grid-v6/migration-data-grid-v6.md +++ b/docs/data/migration/migration-data-grid-v6/migration-data-grid-v6.md @@ -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"`. - +- 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 diff --git a/docs/pages/x/api/data-grid/data-grid-premium.json b/docs/pages/x/api/data-grid/data-grid-premium.json index 90e048ac17a9..2495f2b956ea 100644 --- a/docs/pages/x/api/data-grid/data-grid-premium.json +++ b/docs/pages/x/api/data-grid/data-grid-premium.json @@ -455,13 +455,6 @@ "describedArgs": ["params", "event", "details"] } }, - "onRowEditCommit": { - "type": { "name": "func" }, - "signature": { - "type": "function(id: GridRowId, event: MuiEvent) => void", - "describedArgs": ["id", "event"] - } - }, "onRowEditStart": { "type": { "name": "func" }, "signature": { diff --git a/docs/pages/x/api/data-grid/data-grid-pro.json b/docs/pages/x/api/data-grid/data-grid-pro.json index 7b3e2e89f0d4..cb6929e29954 100644 --- a/docs/pages/x/api/data-grid/data-grid-pro.json +++ b/docs/pages/x/api/data-grid/data-grid-pro.json @@ -409,13 +409,6 @@ "describedArgs": ["params", "event", "details"] } }, - "onRowEditCommit": { - "type": { "name": "func" }, - "signature": { - "type": "function(id: GridRowId, event: MuiEvent) => void", - "describedArgs": ["id", "event"] - } - }, "onRowEditStart": { "type": { "name": "func" }, "signature": { diff --git a/docs/pages/x/api/data-grid/data-grid.json b/docs/pages/x/api/data-grid/data-grid.json index 35526160a411..bda17ab90d9a 100644 --- a/docs/pages/x/api/data-grid/data-grid.json +++ b/docs/pages/x/api/data-grid/data-grid.json @@ -322,13 +322,6 @@ "describedArgs": ["params", "event", "details"] } }, - "onRowEditCommit": { - "type": { "name": "func" }, - "signature": { - "type": "function(id: GridRowId, event: MuiEvent) => void", - "describedArgs": ["id", "event"] - } - }, "onRowEditStart": { "type": { "name": "func" }, "signature": { diff --git a/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json b/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json index 1cff481853a8..29f089b94a47 100644 --- a/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json +++ b/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json @@ -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": { diff --git a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json index 80d95b46ddb1..40ad5cf3b8eb 100644 --- a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json +++ b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json @@ -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": { diff --git a/docs/translations/api-docs/data-grid/data-grid/data-grid.json b/docs/translations/api-docs/data-grid/data-grid/data-grid.json index e39db6e5df53..9647209e1538 100644 --- a/docs/translations/api-docs/data-grid/data-grid/data-grid.json +++ b/docs/translations/api-docs/data-grid/data-grid/data-grid.json @@ -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": { diff --git a/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx b/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx index bd22bc5b2f73..17e518486a87 100644 --- a/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx +++ b/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx @@ -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} 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]]. diff --git a/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx b/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx index 5e1fdf51f09f..cbb17ba529b8 100644 --- a/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx +++ b/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx @@ -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} 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]]. diff --git a/packages/x-data-grid/src/DataGrid/DataGrid.tsx b/packages/x-data-grid/src/DataGrid/DataGrid.tsx index 2ddc1e9b3dd4..a971d1e3fb38 100644 --- a/packages/x-data-grid/src/DataGrid/DataGrid.tsx +++ b/packages/x-data-grid/src/DataGrid/DataGrid.tsx @@ -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} 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]]. diff --git a/packages/x-data-grid/src/models/events/gridEventLookup.ts b/packages/x-data-grid/src/models/events/gridEventLookup.ts index 7a107f4c7cf1..31ed5a43554a 100644 --- a/packages/x-data-grid/src/models/events/gridEventLookup.ts +++ b/packages/x-data-grid/src/models/events/gridEventLookup.ts @@ -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'; @@ -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 /** diff --git a/packages/x-data-grid/src/models/props/DataGridProps.ts b/packages/x-data-grid/src/models/props/DataGridProps.ts index 01cb8bcd8e1b..cab7a732b01e 100644 --- a/packages/x-data-grid/src/models/props/DataGridProps.ts +++ b/packages/x-data-grid/src/models/props/DataGridProps.ts @@ -469,12 +469,6 @@ export interface DataGridPropsWithoutDefaultValue} 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} 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]].