React TreeList - editing.changes

An array of pending row changes.

Selector: Change
Type:

Array<DataChange>

Default Value: []
Raised Events: onOptionChanged

This array can be changed from the UI, with native JavaScript methods, or with UI component methods (addRow, editRow, editCell, deleteRow).

View Demo

data

An object with updated row fields.

Type:

Object

index CTP

Zero-based index of a new row. Applies only if the type is "insert".

Type:

Number

NOTE
This functionality is available as a community technology preview (CTP). Should you have any questions or suggestions prior to its official release, please create a new ticket in the DevExpress Support Center.

If the pageIndex has a value, this field sets a row index on the specified page. In other cases, this field specifies the row index within the entire grid. Only data and group rows are indexed. To add a row to the end of the page or grid, set index to -1.

key

The key of the row being updated or removed.

Type: any

The key property supports a simple and composite keys.

JavaScript
changes.push({
    type: 'update',
    data: { FirstName : 'name1', LastName: 'name2' }

    key: 1 // simple key
    // or ...
    key: {ID: 1, SecondID: 2} // composite key
});

pageIndex CTP

Zero-based index of a page into which a new row should be inserted. Applies only if the type is "insert" and the pager is used.

Type:

Number

NOTE
This functionality is available as a community technology preview (CTP). Should you have any questions or suggestions prior to its official release, please create a new ticket in the DevExpress Support Center.

This field has a value if the TreeList uses the pager. This value equals paging.pageIndex, but you can override it with a custom value. To add a row to the last page, set this field to -1.

type

Data change type.

Type:

String

Accepted Values: 'insert' | 'update' | 'remove'