Skip to main content

Function: selectRows()

selectRows<Row>(sel, rows, source?): number[]

Defined in: packages/sdvtables/src/predicate.ts:42

The indices into rows that sel picks. A predicate tests each row; an index array names positions in source (default rows), matched to rows by identity. An interactive render passes the table's source rows, so [5] stays the sixth data row whatever page, filter or sort shows it (A49). Throws TableSpecError for an index outside source.

Type Parameters​

Row​

Row

Parameters​

sel​

RowSelector<Row>

rows​

readonly Row[]

source?​

readonly Row[] = rows

Returns​

number[]