Skip to content

@eightkk/vue-weave / core / deleteTreeGridRows

Function: deleteTreeGridRows() ​

deleteTreeGridRows<R>(input, change): object

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

Delete rows. With includeDescendants, every descendant goes too; without it, each deleted row's children take its place among its siblings. Sparse cells of deleted rows are dropped. Returns new arrays in tree preorder (the moved children are new objects with the new parentId). Throws an Error for an unknown or repeated row ID.

Type Parameters ​

R ​

R extends TreeGridRow<unknown>

Parameters ​

input ​

cells? ​

readonly TreeGridCell[]

rows ​

readonly R[]

change ​

Pick<TreeGridRowDelete, "ids" | "includeDescendants">

Returns ​

object

cells ​

cells: TreeGridCell[]

rows ​

rows: R[]

Released under the MIT License.