Skip to content

Latest commit

History

History
91 lines (57 loc) 路 1.56 KB

row.md

File metadata and controls

91 lines (57 loc) 路 1.56 KB
title
Row

These are core options and API properties for all rows. More options and API properties are available for other table features.

Row API

All row objects have the following properties:

id

id: string

The resolved unique identifier for the row resolved via the options.getRowId option. Defaults to the row's index (or relative index if it is a subRow)

depth

depth: number

The depth of the row (if nested or grouped) relative to the root row array.

index

index: number

The index of the row within its parent array (or the root data array)

original

original: TData

The original row object provided to the table.

馃 If the row is a grouped row, the original row object will be the first original in the group.

parentRow

parentRow?: Row<TData>

If nested, this row's parent row.

getValue

getValue: (columnId: string) => any

Returns the value from the row for a given columnId

subRows

type subRows = Row<TData>[]

An array of subRows for the row as returned and created by the options.getSubRows option.

getLeafRows

type getLeafRows = () => Row<TData>[]

Returns the leaf rows for the row, not including any parent rows.

originalSubRows

originalSubRows?: TData[]

An array of the original subRows as returned by the options.getSubRows option.

getAllCells

type getAllCells = () => Cell<TData>[]

Returns all of the Cells for the row.