These are core options and API properties for all rows. More options and API properties are available for other table features.
All row objects have the following properties:
id: string
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: number
depth: number
The depth of the row (if nested or grouped) relative to the root row array.
index: number
index: number
The index of the row within its parent array (or the root data array)
original: TData
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.
parentId?: string
parentId?: string
If nested, this row's parent row id.
getValue: (columnId: string) => TValue
getValue: (columnId: string) => TValue
Returns the value from the row for a given columnId
renderValue: (columnId: string) => TValue
renderValue: (columnId: string) => TValue
Renders the value from the row for a given columnId, but will return the renderFallbackValue if no value is found.
getUniqueValues: (columnId: string) => TValue[]
getUniqueValues: (columnId: string) => TValue[]
Returns a unique array of values from the row for a given columnId.
type subRows = Row<TData>[]
type subRows = Row<TData>[]
An array of subRows for the row as returned and created by the options.getSubRows option.
type getParentRow = () => Row<TData> | undefined
type getParentRow = () => Row<TData> | undefined
Returns the parent row for the row, if it exists.
type getParentRows = () => Row<TData>[]
type getParentRows = () => Row<TData>[]
Returns the parent rows for the row, all the way up to a root row.
type getLeafRows = () => Row<TData>[]
type getLeafRows = () => Row<TData>[]
Returns the leaf rows for the row, not including any parent rows.
originalSubRows?: TData[]
originalSubRows?: TData[]
An array of the original subRows as returned by the options.getSubRows option.
type getAllCells = () => Cell<TData>[]
type getAllCells = () => Cell<TData>[]
Returns all of the Cells for the row.
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.