Row
The Row object represents a row in the table.
API Options
id
id: stringid: stringThe 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: numberdepth: numberThe depth of the row (if nested or grouped) relative to the root row array.
index
index: numberindex: numberThe index of the row within its parent array (or the root data array)
original
original: TDataoriginal: TDataThe 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.
parentId
parentId?: stringparentId?: stringIf nested, this row's parent row id.
getValue
getValue: (columnId: string) => anygetValue: (columnId: string) => anyReturns the value from the row for a given columnId
subRows
type subRows = Row<TData>[]type subRows = Row<TData>[]An array of subRows for the row as returned and created by the options.getSubRows option.
getParentRow
type getParentRow = () => Row<TData> | undefinedtype getParentRow = () => Row<TData> | undefinedReturns the parent row for the row, if it exists.
getParentRows
type getParentRows = () => Row<TData>[]type getParentRows = () => Row<TData>[]Returns the parent rows for the row, all the way up to a root row.
getLeafRows
type getLeafRows = () => Row<TData>[]type getLeafRows = () => Row<TData>[]Returns the leaf rows for the row, not including any parent rows.
originalSubRows
originalSubRows?: TData[]originalSubRows?: TData[]An array of the original subRows as returned by the options.getSubRows option.
getAllCells
type getAllCells = () => Cell<TData>[]type getAllCells = () => Cell<TData>[]Returns all of the Cells for the row.
Credits
- Row - TanStack Table
v8Docs