本文へ移動

@eightkk/vue-weave / core / applyTreeGridEdits

Function: applyTreeGridEdits() ​

applyTreeGridEdits<R>(input, edits): object

Defined in: src/core/treeGrid.ts:914

Apply cell edits (a cell-edit, or the edits of a sheet-edit) to the input and return new rows and cells. A field column's edit calls its update(row, after); a sparse column's edit replaces the cell's value (dropping its status and label, keeping tone, entities and editable), adds a cell, or with after: null removes it. Unchanged rows and cells keep their identity; the inputs are not modified. Throws an Error for an unknown row or column, a field column without update, and a TypeError for an array value or a sparse value that is not a string, number or boolean.

Type Parameters ​

R ​

R extends TreeGridRow<unknown>

Parameters ​

input ​

cells? ​

readonly TreeGridCell[]

columns ​

readonly TreeGridColumn<R>[]

rows ​

readonly R[]

edits ​

Iterable<TreeGridCellEdit>

Returns ​

object

cells ​

cells: TreeGridCell[]

rows ​

rows: R[]

MIT ライセンスで公開しています。