本文へ移動

@eightkk/vue-weave / core / insertTreeGridRow

Function: insertTreeGridRow() ​

insertTreeGridRow<R>(rows, change, row): R[]

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

Insert row (whose ID the parent chose) where a row-create proposal says. Returns the rows in tree preorder with the new row's parentId set from the proposal; other rows keep their identity. Throws an Error for an unknown parent or a row ID already in use, and a RangeError for an index that is not an integer from 0 to the number of siblings.

Type Parameters ​

R ​

R extends TreeGridRow<unknown>

Parameters ​

rows ​

readonly R[]

change ​

Pick<TreeGridRowCreate, "parentId" | "index">

row ​

R

Returns ​

R[]

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