Row

Row objects are instances that represent individual data rows in the table. The Row types are organized by feature. All feature types are ultimately joined in the single Row type definition. See the Rows guide for implementation details.

API

CoreRow

Basic row properties available on all rows regardless of features enabled. Includes row identification (id, index), hierarchy information (depth, parent), data access, and references to associated cells and sub-rows.

CoreRow<TData extends unknown>
PropType
The depth of the row (if nested or grouped) relative to the root row array.
number
Returns all of the cells for the row.
      () => Cell<
      TData,
      unknown
      >[]
      Returns the leaf rows for the row, not including any parent rows.
          () => Row<TData>[]
          Returns the parent row for the row, if it exists.
              () =>
              | Row<TData>
              | undefined
              Returns the parent rows for the row, all the way up to a root row.
                  () => Row<TData>[]
                  Returns a unique array of values from the row for a given columnId.
                    (
                    columnId: string,
                    ) => TValue[]
                    Returns the value from the row for a given columnId.
                      (
                      columnId: string,
                      ) => TValue
                      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).
                      string
                      The index of the row within its parent array (or the root data array).
                      number
                      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.
                      TData
                      An array of the original subRows as returned by the options.getSubRows option.
                      TData[]
                      If nested, this row's parent row id.
                      string
                      An array of subRows for the row as returned and created by the options.getSubRows option.
                      Row<TData>[]
                      Type
                      number
                      Description
                      The depth of the row (if nested or grouped) relative to the root row array.
                      Type
                      () => Cell<
                      TData,
                      unknown
                      >[]
                      Description
                      Returns all of the cells for the row.
                          Type
                          () => Row<TData>[]
                          Description
                          Returns the leaf rows for the row, not including any parent rows.
                              Type
                              () =>
                              | Row<TData>
                              | undefined
                              Description
                              Returns the parent row for the row, if it exists.
                                  Type
                                  () => Row<TData>[]
                                  Description
                                  Returns the parent rows for the row, all the way up to a root row.
                                      Type
                                      (
                                      columnId: string,
                                      ) => TValue[]
                                      Description
                                      Returns a unique array of values from the row for a given columnId.
                                        Type
                                        (
                                        columnId: string,
                                        ) => TValue
                                        Description
                                        Returns the value from the row for a given columnId.
                                          Type
                                          string
                                          Description
                                          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).
                                          Type
                                          number
                                          Description
                                          The index of the row within its parent array (or the root data array).
                                          Type
                                          TData
                                          Description
                                          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.
                                          Type
                                          TData[]
                                          Description
                                          An array of the original subRows as returned by the options.getSubRows option.
                                          Type
                                          string
                                          Description
                                          If nested, this row's parent row id.
                                          Type
                                          Row<TData>[]
                                          Description
                                          An array of subRows for the row as returned and created by the options.getSubRows option.

                                          ColumnPinningRow

                                          Properties for accessing pinned row cells. Provides methods to retrieve cells for left-pinned, right-pinned, and center (unpinned) columns. See the Column Pinning guide for implementation details.

                                          ColumnPinningRow<TData extends unknown>
                                          PropType
                                          Returns all center pinned (unpinned) leaf cells in the row.
                                              () => Cell<
                                              TData,
                                              unknown
                                              >[]
                                              Returns all left pinned leaf cells in the row.
                                                  () => Cell<
                                                  TData,
                                                  unknown
                                                  >[]
                                                  Returns all right pinned leaf cells in the row.
                                                      () => Cell<
                                                      TData,
                                                      unknown
                                                      >[]
                                                      Type
                                                      () => Cell<
                                                      TData,
                                                      unknown
                                                      >[]
                                                      Description
                                                      Returns all center pinned (unpinned) leaf cells in the row.
                                                          Type
                                                          () => Cell<
                                                          TData,
                                                          unknown
                                                          >[]
                                                          Description
                                                          Returns all left pinned leaf cells in the row.
                                                              Type
                                                              () => Cell<
                                                              TData,
                                                              unknown
                                                              >[]
                                                              Description
                                                              Returns all right pinned leaf cells in the row.

                                                                  FiltersRow

                                                                  Properties and methods related to row filtering state. Includes visibility state based on applied filters and filter values for the current row. See the Column Filtering guide for implementation details.

                                                                  FiltersRow<_TData extends unknown>
                                                                  PropType
                                                                  The column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID.
                                                                  Record<
                                                                  string,
                                                                  boolean
                                                                  >
                                                                  The column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process.
                                                                  Record<
                                                                  string,
                                                                  Record<string, any>
                                                                  >
                                                                  Type
                                                                  Record<
                                                                  string,
                                                                  boolean
                                                                  >
                                                                  Description
                                                                  The column filters map for the row. This object tracks whether a row is passing/failing specific filters by their column ID.
                                                                  Type
                                                                  Record<
                                                                  string,
                                                                  Record<string, any>
                                                                  >
                                                                  Description
                                                                  The column filters meta map for the row. This object tracks any filter meta for a row as optionally provided during the filtering process.

                                                                  GroupingRow

                                                                  Properties and methods for grouped rows and aggregation. Provides access to grouped row state, leaf rows, aggregated values, and methods to expand or collapse grouped rows.

                                                                  PropType
                                                                  Returns the grouping value for any row and column (including leaf rows).
                                                                    (
                                                                    columnId: string,
                                                                    ) => unknown
                                                                    Returns whether the row is currently grouped.
                                                                      () => boolean
                                                                      If this row is grouped, this is the id of the column that this row is grouped by.
                                                                      string
                                                                      If this row is grouped, this is the unique/shared value for the groupingColumnId for all of the rows in this group.
                                                                      unknown
                                                                      Type
                                                                      (
                                                                      columnId: string,
                                                                      ) => unknown
                                                                      Description
                                                                      Returns the grouping value for any row and column (including leaf rows).
                                                                        Type
                                                                        () => boolean
                                                                        Description
                                                                        Returns whether the row is currently grouped.
                                                                          Type
                                                                          string
                                                                          Description
                                                                          If this row is grouped, this is the id of the column that this row is grouped by.
                                                                          Type
                                                                          unknown
                                                                          Description
                                                                          If this row is grouped, this is the unique/shared value for the groupingColumnId for all of the rows in this group.

                                                                          RowSelectionRow

                                                                          Properties and methods for row selection state management. Includes selection status (selected, partially selected), methods to select or deselect rows, and methods to toggle selection. See the Row Selection guide for implementation details.

                                                                          PropType
                                                                          Returns whether the row can multi-select.
                                                                            () => boolean
                                                                            Returns whether the row can be selected.
                                                                              () => boolean
                                                                              Returns whether the row can select sub rows automatically when the parent row is selected.
                                                                                () => boolean
                                                                                Returns whether all of the row's sub rows are selected.
                                                                                  () => boolean
                                                                                  Returns whether the row is selected.
                                                                                    () => boolean
                                                                                    Returns whether some of the row's sub rows are selected.
                                                                                      () => boolean
                                                                                      Returns a handler that can be used to toggle the row.
                                                                                        () => (
                                                                                        event: unknown,
                                                                                        ) => void
                                                                                        Selects/deselects the row.
                                                                                          (
                                                                                          value?: boolean,
                                                                                          opts?: {
                                                                                          selectChildren?: boolean
                                                                                          },
                                                                                          ) => void
                                                                                          Type
                                                                                          () => boolean
                                                                                          Description
                                                                                          Returns whether the row can multi-select.
                                                                                            Type
                                                                                            () => boolean
                                                                                            Description
                                                                                            Returns whether the row can be selected.
                                                                                              Type
                                                                                              () => boolean
                                                                                              Description
                                                                                              Returns whether the row can select sub rows automatically when the parent row is selected.
                                                                                                Type
                                                                                                () => boolean
                                                                                                Description
                                                                                                Returns whether all of the row's sub rows are selected.
                                                                                                  Type
                                                                                                  () => boolean
                                                                                                  Description
                                                                                                  Returns whether the row is selected.
                                                                                                    Type
                                                                                                    () => boolean
                                                                                                    Description
                                                                                                    Returns whether some of the row's sub rows are selected.
                                                                                                      Type
                                                                                                      () => (
                                                                                                      event: unknown,
                                                                                                      ) => void
                                                                                                      Description
                                                                                                      Returns a handler that can be used to toggle the row.
                                                                                                        Type
                                                                                                        (
                                                                                                        value?: boolean,
                                                                                                        opts?: {
                                                                                                        selectChildren?: boolean
                                                                                                        },
                                                                                                        ) => void
                                                                                                        Description
                                                                                                        Selects/deselects the row.

                                                                                                          ExpandedRow

                                                                                                          Properties and methods for expandable rows. Provides expansion state, methods to expand or collapse rows, and access to parent/child relationships in hierarchical data. See the Expanding guide for implementation details.

                                                                                                          PropType
                                                                                                          Returns whether the row can be expanded.
                                                                                                            () => boolean
                                                                                                            Returns whether all parent rows of the row are expanded.
                                                                                                              () => boolean
                                                                                                              Returns whether the row is expanded.
                                                                                                                () => boolean
                                                                                                                Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button.
                                                                                                                  () => () => void
                                                                                                                  Toggles the expanded state (or sets it if expanded is provided) for the row.
                                                                                                                    (
                                                                                                                    expanded?: boolean,
                                                                                                                    ) => void
                                                                                                                    Type
                                                                                                                    () => boolean
                                                                                                                    Description
                                                                                                                    Returns whether the row can be expanded.
                                                                                                                      Type
                                                                                                                      () => boolean
                                                                                                                      Description
                                                                                                                      Returns whether all parent rows of the row are expanded.
                                                                                                                        Type
                                                                                                                        () => boolean
                                                                                                                        Description
                                                                                                                        Returns whether the row is expanded.
                                                                                                                          Type
                                                                                                                          () => () => void
                                                                                                                          Description
                                                                                                                          Returns a function that can be used to toggle the expanded state of the row. This function can be used to bind to an event handler to a button.
                                                                                                                            Type
                                                                                                                            (
                                                                                                                            expanded?: boolean,
                                                                                                                            ) => void
                                                                                                                            Description
                                                                                                                            Toggles the expanded state (or sets it if expanded is provided) for the row.

                                                                                                                              VisibilityRow

                                                                                                                              Properties for row visibility based on column visibility state. Determines which cells in the row are visible based on the visibility state of their associated columns. See the Column Visibility guide for implementation details.

                                                                                                                              VisibilityRow<TData extends unknown>
                                                                                                                              PropType
                                                                                                                              Returns an array of cells that account for column visibility for the row.
                                                                                                                                  () => Cell<TData>[]
                                                                                                                                  Type
                                                                                                                                  () => Cell<TData>[]
                                                                                                                                  Description
                                                                                                                                  Returns an array of cells that account for column visibility for the row.
                                                                                                                                      Updated by Ryan Bower