You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(react-grid): rename the changedRows Getter and dependent properties (#657)
BREAKING CHANGES:
The following EditingState plugin's properties have been renamed to improve the API consistency:
- `changedRows` => `rowChanges`
- `defaultChangedRows` => `defaultRowChanges`
- `onChangedRowsChange` => `onRowChangesChange`
The `changedRows` getter has been renamed to `rowChanges`.
Copy file name to clipboardExpand all lines: packages/dx-react-grid/docs/reference/editing-state.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,19 +12,19 @@ none
12
12
13
13
Name | Type | Default | Description
14
14
-----|------|---------|------------
15
-
createRowChange | (row: any, columnName: string, value: string | number) => any | | A function that returns a row changes object depending on row editor values. This function is called each time the row editor's value changes.
15
+
createRowChange | (row: any, columnName: string, value: string | number) => any | | A function that returns a row change object depending on row editor values. This function is called each time the row editor's value changes.
16
16
columnExtensions | Array<[EditingColumnExtension](#editingcolumnextension)> | | Additional column properties that the plugin can handle.
17
-
editingRowIds | Array<number | string> | | Specifies IDs of the rows being edited.
18
-
defaultEditingRowIds | Array<number | string> | [] | Specifies IDs of the rows initially added to the `editingRowIds` array in uncontrolled mode.
17
+
editingRowIds | Array<number | string> | | IDs of the rows being edited.
18
+
defaultEditingRowIds | Array<number | string> | [] | IDs of the rows initially added to the `editingRowIds` array in uncontrolled mode.
19
19
onEditingRowIdsChange | (editingRowIds: Array<number | string>) => void | | Handles adding or removing a row to/from the `editingRowIds` array.
20
-
addedRows | Array<any> | | Specifies created but not committed rows.
21
-
defaultAddedRows | Array<any> | [] | Specifies rows initially added to the `addedRows` array in uncontrolled mode.
20
+
addedRows | Array<any> | | Created but not committed rows.
21
+
defaultAddedRows | Array<any> | [] | Rows initially added to the `addedRows` array in uncontrolled mode.
22
22
onAddedRowsChange | (addedRows: Array<any>) => void | | Handles adding or removing a row to/from the `addedRows` array.
23
-
changedRows | { [key: string]: any } | | Specifies changed but not committed rows.
24
-
defaultChangedRows | { [key: string]: any } | {} | Specifies rows initially added to the `changedRows` array in uncontrolled mode.
25
-
onChangedRowsChange | (changedRows: { [key: string]: any }) => void | | Handles adding or removing a row to/from the `changedRows` array.
26
-
deletedRowIds | Array<number | string> | | Specifies IDs of the rows prepared for deletion.
27
-
defaultDeletedRowIds | Array<number | string> | [] | Specifies rows initially added to the `deletedRowIds` array in uncontrolled mode.
23
+
rowChanges | { [key: string]: any } | | Not committed row changes.
24
+
defaultRowChanges | { [key: string]: any } | {} | Row changes initially added to the `rowChanges` array in uncontrolled mode.
25
+
onRowChangesChange | (rowChanges: { [key: string]: any }) => void | | Handles adding or removing a row changes to/from the `rowChanges` array.
26
+
deletedRowIds | Array<number | string> | | IDs of the rows prepared for deletion.
27
+
defaultDeletedRowIds | Array<number | string> | [] | Rows initially added to the `deletedRowIds` array in uncontrolled mode.
28
28
onDeletedRowIdsChange | (deletedRowIds: Array<number | string>) => void | | Handles adding a row to or removing from the `deletedRowIds` array.
@@ -39,7 +39,7 @@ A value with the following shape:
39
39
Field | Type | Description
40
40
------|------|------------
41
41
columnName | string | The name of a column to extend.
42
-
createRowChange? | (row: any, value: any, columnName: string) => any | A function that returns a value specifying row changes depending on the columns's editor values for the current row. This function is called each time the editor's value changes.
42
+
createRowChange? | (row: any, value: any, columnName: string) => any | A function that returns a value specifying row changes depending on the columns' editor values for the current row. This function is called each time the editor's value changes.
addedRows | Getter | Array<any> | Created but not committed rows.
70
70
addRow | Action | () => void | Adds an item to the `addedRows` array.
71
71
changeAddedRow | Action | ({ rowId: number, change: any }) => void | Applies a change to a created but uncommitted row. Note: `rowId` is a row index within the `addedRows` array.
72
-
cancelAddedRows | Action | ({ rowIds: Array<number> }) => void | Removes specified rows from the `addedRows` array.
72
+
cancelAddedRows | Action | ({ rowIds: Array<number> }) => void | Removes the specified rows from the `addedRows` array.
73
73
commitAddedRows | Action | ({ rowIds: Array<number> }) => void | Fires the `onCommitChanges` event with the corresponding [ChangeSet](#changeset) and removes specified rows from the `addedRows` array.
74
-
changedRows | Getter | { [key: string]: any } | An associated array that stores changes made to existing rows. Each array item specifies changes made to a row. The item's key specifies the associated row's ID.
75
-
changeRow | Action | ({ rowId: number | string, change: any }) => void | Adds an item representing changes made to an exsiting row to the `changedRows` array.
76
-
cancelChangedRows | Action | ({ rowIds: Array<number | string> }) => void | Removes specified rows' data from the `changedRows` array.
77
-
commitChangedRows | Action | ({ rowIds: Array<number | string> }) => void | Fires the `onCommitChanges` event with the corresponding [ChangeSet](#changeset) and removes specified rows from the `changedRows` array.
74
+
rowChanges | Getter | { [key: string]: any } | An associated array that stores changes made to existing rows. Each array item specifies changes made to a row. The item's key specifies the associated row's ID.
75
+
changeRow | Action | ({ rowId: number | string, change: any }) => void | Adds an item representing changes made to an exsiting row to the `rowChanges` array.
76
+
cancelChangedRows | Action | ({ rowIds: Array<number | string> }) => void | Removes specified rows' data from the `rowChanges` array.
77
+
commitChangedRows | Action | ({ rowIds: Array<number | string> }) => void | Fires the `onCommitChanges` event with the corresponding [ChangeSet](#changeset) and removes specified rows from the `rowChanges` array.
deleteRows | Action | ({ rowIds: Array<number | string> }) => void | Adds rows the ID specifies to the `deletedRowIds` array.
80
-
cancelDeletedRows | Action | ({ rowIds: Array<number | string> }) => void | Removes specified rows from the `deletedRowIds` array.
80
+
cancelDeletedRows | Action | ({ rowIds: Array<number | string> }) => void | Removes the specified rows from the `deletedRowIds` array.
81
81
commitDeletedRows | Action | ({ rowIds: Array<number | string> }) => void | Fires the `onCommitChanges` event with the corresponding [ChangeSet](#changeset) and removes specified rows from the `deletedRowIds` array.
82
-
createRowChange | Getter | (row: any, value: any, columnName: string) => any | A function that returns a value that specifies row changes depending on columns editor values for the current row. This function is called each time the editor's value changes.
82
+
createRowChange | Getter | (row: any, value: any, columnName: string) => any | A function that returns a value that specifies row changes depending on the column's editor values for the current row. This function is called each time the editor's value changes.
TableEditColumn.Command | [EditCommandProps](#editcommandprops) | A component that renders command control within a command cell.
76
+
TableEditColumn.Command | [EditCommandProps](#editcommandprops) | A component that renders a command control within a command cell.
77
77
TableEditColumn.Cell | [TableEditColumnCellProps](#tableeditcolumncellprops) | A component that renders a command cell within a data row.
78
78
TableEditColumn.HeaderCell | [TableEditColumnHeaderCellProps](#tableeditcolumnheadercellprops) | A component that renders a command cell within the header row.
startEditRows | Action | ({ rowIds: Array<number | string> }) => void | Switches rows with the specified ID to the edit mode.
93
93
stopEditRows | Action | ({ rowIds: Array<number | string> }) => void | Switches rows with the specified ID to the read-only mode.
94
94
cancelChangedRows | Action | ({ rowIds: Array<number | string> }) => void | Cancels uncommitted changes in rows with the specified ID.
95
-
commitChangedRows | Action | ({ rowIds: Array<number | string> }) => void | Fires the `onCommitChanges` event with the corresponding [ChangeSet](editing-state.md#changeset) and removes specified rows from the `changedRows` array.
96
-
deleteRows | Action | ({ rowIds: Array<number | string> }) => void | Prepares rows with the specified ID for deletion by adding them to the `deletedRowIds` array.
95
+
commitChangedRows | Action | ({ rowIds: Array<number | string> }) => void | Fires the `onCommitChanges` event with the corresponding [ChangeSet](editing-state.md#changeset) and removes specified rows from the `rowChanges` array.
96
+
deleteRows | Action | ({ rowIds: Array<number | string> }) => void | Prepares rows with the specified ID for deletion by adding them to the `deletedRows` array.
97
97
commitDeletedRows | Action | ({ rowIds: Array<number | string> }) => void | Fires the `onCommitChanges` event with the corresponding [ChangeSet](editing-state.md#changeset) and removes specified rows from the `deletedRowIds` array.
98
98
tableCell | Template | [TableCellProps](table.md#tablecellprops) | A template that renders a table cell.
0 commit comments