QUI React Table

Column

TIP

This page refers to the table's column objects that are generated within the table instance. Refer to this link for the column definitions API.

The Column types are organized by feature. All feature types are ultimately joined in the single Column type definition.

API

CoreColumn

Name & DescriptionOption(s)Default
The original column def used to create the column.
ColumnDef
The child column (if the column is a group column). Will be an empty array if the column is not a group column.
Column[]
The depth of the column (if grouped) relative to the root column def array.
number
Returns the flattened array of this column and all child/grand-child columns for this column.
      () => Column<
      TData,
      TValue,
      ColumnMeta
      >[]
      Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column.
          () => Column<
          TData,
          TValue,
          ColumnMeta
          >[]
          The resolved unique identifier for the column resolved in this priority:
          - A manual
          id property from the column def
          - The accessor key from the column def
          - The header string from the column def
          string
          The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.
              (
              originalRow: TData,
              index: number,
              ) => TValue
              The parent column for this column. Will be undefined if this is a root column.
              Column
              Type
              ColumnDef
              Description
              The original column def used to create the column.
              Type
              Column[]
              Description
              The child column (if the column is a group column). Will be an empty array if the column is not a group column.
              Type
              number
              Description
              The depth of the column (if grouped) relative to the root column def array.
              Type
              () => Column<
              TData,
              TValue,
              ColumnMeta
              >[]
              Description
              Returns the flattened array of this column and all child/grand-child columns for this column.
                  Type
                  () => Column<
                  TData,
                  TValue,
                  ColumnMeta
                  >[]
                  Description
                  Returns an array of all leaf-node columns for this column. If a column has no children, it is considered the only leaf-node column.
                      Type
                      string
                      Description
                      The resolved unique identifier for the column resolved in this priority:
                      - A manual
                      id property from the column def
                      - The accessor key from the column def
                      - The header string from the column def
                      Type
                      (
                      originalRow: TData,
                      index: number,
                      ) => TValue
                      Description
                      The resolved accessor function to use when extracting the value for the column from each row. Will only be defined if the column def has a valid accessor key or function defined.
                          Type
                          Column
                          Description
                          The parent column for this column. Will be undefined if this is a root column.

                          FiltersColumn

                          Name & DescriptionOption(s)Default
                          Returns an automatically calculated filter function for the column based off of the columns first known value.
                              () => signature
                              Returns whether the column can be **column** filtered.
                                  () => boolean
                                  Returns whether the column can be globally filtered. Set to false to disable a column from being scanned during global filtering.
                                      () => boolean
                                      A function that computes and returns a min/max tuple derived from getFacetedRowModel. Useful for displaying faceted result values. > ⚠️ Requires that you pass a valid getFacetedMinMaxValues function to options.getFacetedMinMaxValues. A default implementation is provided via the exported getFacetedMinMaxValues function.
                                          () => [
                                          number,
                                          number,
                                          ]
                                          Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts.️ Requires that you pass a valid getFacetedRowModel function to options.facetedRowModel. A default implementation is provided via the exported getFacetedRowModel function.
                                              () => RowModel<TData>
                                              A function that computes and returns a Map of unique values and their occurrences derived from column.getFacetedRowModel. Useful for displaying faceted result values. Requires that you pass a valid getFacetedUniqueValues function to options.getFacetedUniqueValues. A default implementation is provided via the exported getFacetedUniqueValues function.
                                                  () => Map<
                                                  any,
                                                  number
                                                  >
                                                  Returns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified.
                                                      () => signature
                                                      Returns the index of the column filter in the table's state.columnFilters array. Returns -1 if not found.
                                                          () => number
                                                          Returns the current filter value for the column.
                                                              () => unknown
                                                              Returns whether the column is currently filtered.
                                                                  () => boolean
                                                                  A function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values.
                                                                      (
                                                                      updater: any,
                                                                      ) => void
                                                                      Type
                                                                      () => signature
                                                                      Description
                                                                      Returns an automatically calculated filter function for the column based off of the columns first known value.
                                                                          Type
                                                                          () => boolean
                                                                          Description
                                                                          Returns whether the column can be **column** filtered.
                                                                              Type
                                                                              () => boolean
                                                                              Description
                                                                              Returns whether the column can be globally filtered. Set to false to disable a column from being scanned during global filtering.
                                                                                  Type
                                                                                  () => [
                                                                                  number,
                                                                                  number,
                                                                                  ]
                                                                                  Description
                                                                                  A function that computes and returns a min/max tuple derived from getFacetedRowModel. Useful for displaying faceted result values. > ⚠️ Requires that you pass a valid getFacetedMinMaxValues function to options.getFacetedMinMaxValues. A default implementation is provided via the exported getFacetedMinMaxValues function.
                                                                                      Type
                                                                                      () => RowModel<TData>
                                                                                      Description
                                                                                      Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts.️ Requires that you pass a valid getFacetedRowModel function to options.facetedRowModel. A default implementation is provided via the exported getFacetedRowModel function.
                                                                                          Type
                                                                                          () => Map<
                                                                                          any,
                                                                                          number
                                                                                          >
                                                                                          Description
                                                                                          A function that computes and returns a Map of unique values and their occurrences derived from column.getFacetedRowModel. Useful for displaying faceted result values. Requires that you pass a valid getFacetedUniqueValues function to options.getFacetedUniqueValues. A default implementation is provided via the exported getFacetedUniqueValues function.
                                                                                              Type
                                                                                              () => signature
                                                                                              Description
                                                                                              Returns the filter function (either user-defined or automatic, depending on configuration) for the columnId specified.
                                                                                                  Type
                                                                                                  () => number
                                                                                                  Description
                                                                                                  Returns the index of the column filter in the table's state.columnFilters array. Returns -1 if not found.
                                                                                                      Type
                                                                                                      () => unknown
                                                                                                      Description
                                                                                                      Returns the current filter value for the column.
                                                                                                          Type
                                                                                                          () => boolean
                                                                                                          Description
                                                                                                          Returns whether the column is currently filtered.
                                                                                                              Type
                                                                                                              (
                                                                                                              updater: any,
                                                                                                              ) => void
                                                                                                              Description
                                                                                                              A function that sets the current filter value for the column. You can pass it a value or an updater function for immutability-safe operations on existing values.

                                                                                                                  SortingColumn

                                                                                                                  Name & DescriptionOption(s)Default
                                                                                                                  Removes this column from the table's sorting state
                                                                                                                      () => void
                                                                                                                      Returns a sort direction automatically inferred based on the columns values.
                                                                                                                          () =>
                                                                                                                          | 'asc'
                                                                                                                          | 'desc'
                                                                                                                          Returns a sorting function automatically inferred based on the columns values.
                                                                                                                              () => any
                                                                                                                              Returns whether this column can be multi-sorted.
                                                                                                                                  () => boolean
                                                                                                                                  Returns whether this column can be sorted.
                                                                                                                                      () => boolean
                                                                                                                                      Returns the first direction that should be used when sorting this column.
                                                                                                                                          () =>
                                                                                                                                          | 'asc'
                                                                                                                                          | 'desc'
                                                                                                                                          Returns the current sort direction of this column.
                                                                                                                                              () =>
                                                                                                                                              | false
                                                                                                                                              | 'asc'
                                                                                                                                              | 'desc'
                                                                                                                                              Returns the next sorting order.
                                                                                                                                                  () =>
                                                                                                                                                  | false
                                                                                                                                                  | 'asc'
                                                                                                                                                  | 'desc'
                                                                                                                                                  Returns the index position of this column's sorting within the sorting state
                                                                                                                                                      () => number
                                                                                                                                                      Returns the resolved sorting function to be used for this column
                                                                                                                                                          () => any
                                                                                                                                                          Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header.
                                                                                                                                                              () => (
                                                                                                                                                              event: unknown,
                                                                                                                                                              ) => void
                                                                                                                                                              Toggles this columns sorting state. If desc is provided, it will force the sort direction to that value. If isMulti is provided, it will additivity multi-sort the column (or toggle it if it is already sorted).
                                                                                                                                                                  (
                                                                                                                                                                  desc?: boolean,
                                                                                                                                                                  isMulti?: boolean,
                                                                                                                                                                  ) => void
                                                                                                                                                                  Type
                                                                                                                                                                  () => void
                                                                                                                                                                  Description
                                                                                                                                                                  Removes this column from the table's sorting state
                                                                                                                                                                      Type
                                                                                                                                                                      () =>
                                                                                                                                                                      | 'asc'
                                                                                                                                                                      | 'desc'
                                                                                                                                                                      Description
                                                                                                                                                                      Returns a sort direction automatically inferred based on the columns values.
                                                                                                                                                                          Type
                                                                                                                                                                          () => any
                                                                                                                                                                          Description
                                                                                                                                                                          Returns a sorting function automatically inferred based on the columns values.
                                                                                                                                                                              Type
                                                                                                                                                                              () => boolean
                                                                                                                                                                              Description
                                                                                                                                                                              Returns whether this column can be multi-sorted.
                                                                                                                                                                                  Type
                                                                                                                                                                                  () => boolean
                                                                                                                                                                                  Description
                                                                                                                                                                                  Returns whether this column can be sorted.
                                                                                                                                                                                      Type
                                                                                                                                                                                      () =>
                                                                                                                                                                                      | 'asc'
                                                                                                                                                                                      | 'desc'
                                                                                                                                                                                      Description
                                                                                                                                                                                      Returns the first direction that should be used when sorting this column.
                                                                                                                                                                                          Type
                                                                                                                                                                                          () =>
                                                                                                                                                                                          | false
                                                                                                                                                                                          | 'asc'
                                                                                                                                                                                          | 'desc'
                                                                                                                                                                                          Description
                                                                                                                                                                                          Returns the current sort direction of this column.
                                                                                                                                                                                              Type
                                                                                                                                                                                              () =>
                                                                                                                                                                                              | false
                                                                                                                                                                                              | 'asc'
                                                                                                                                                                                              | 'desc'
                                                                                                                                                                                              Description
                                                                                                                                                                                              Returns the next sorting order.
                                                                                                                                                                                                  Type
                                                                                                                                                                                                  () => number
                                                                                                                                                                                                  Description
                                                                                                                                                                                                  Returns the index position of this column's sorting within the sorting state
                                                                                                                                                                                                      Type
                                                                                                                                                                                                      () => any
                                                                                                                                                                                                      Description
                                                                                                                                                                                                      Returns the resolved sorting function to be used for this column
                                                                                                                                                                                                          Type
                                                                                                                                                                                                          () => (
                                                                                                                                                                                                          event: unknown,
                                                                                                                                                                                                          ) => void
                                                                                                                                                                                                          Description
                                                                                                                                                                                                          Returns a function that can be used to toggle this column's sorting state. This is useful for attaching a click handler to the column header.
                                                                                                                                                                                                              Type
                                                                                                                                                                                                              (
                                                                                                                                                                                                              desc?: boolean,
                                                                                                                                                                                                              isMulti?: boolean,
                                                                                                                                                                                                              ) => void
                                                                                                                                                                                                              Description
                                                                                                                                                                                                              Toggles this columns sorting state. If desc is provided, it will force the sort direction to that value. If isMulti is provided, it will additivity multi-sort the column (or toggle it if it is already sorted).

                                                                                                                                                                                                                  GroupingColumn

                                                                                                                                                                                                                  AggregationFn

                                                                                                                                                                                                                  The AggregationFn interface is used on several of the GroupingColumn properties.

                                                                                                                                                                                                                  export type AggregationFn<TData extends RowData> = (
                                                                                                                                                                                                                  columnId: string,
                                                                                                                                                                                                                  leafRows: Row<TData>[],
                                                                                                                                                                                                                  childRows: Row<TData>[],
                                                                                                                                                                                                                  ) => any
                                                                                                                                                                                                                  Name & DescriptionOption(s)Default
                                                                                                                                                                                                                  Returns the aggregation function for the column.
                                                                                                                                                                                                                      () => AggregationFn<TData>
                                                                                                                                                                                                                      Returns the automatically inferred aggregation function for the column.
                                                                                                                                                                                                                          () => AggregationFn<TData>
                                                                                                                                                                                                                          Returns whether the column can be grouped.
                                                                                                                                                                                                                              () => boolean
                                                                                                                                                                                                                              Returns the index of the column in the grouping state.
                                                                                                                                                                                                                                  () => number
                                                                                                                                                                                                                                  Returns whether the column is currently grouped.
                                                                                                                                                                                                                                      () => boolean
                                                                                                                                                                                                                                      Returns a function that toggles the grouping state of the column. This is useful for passing to the onClick prop of a button.
                                                                                                                                                                                                                                          () => () => void
                                                                                                                                                                                                                                          Toggles the grouping state of the column.
                                                                                                                                                                                                                                              () => void
                                                                                                                                                                                                                                              Type
                                                                                                                                                                                                                                              () => AggregationFn<TData>
                                                                                                                                                                                                                                              Description
                                                                                                                                                                                                                                              Returns the aggregation function for the column.
                                                                                                                                                                                                                                                  Type
                                                                                                                                                                                                                                                  () => AggregationFn<TData>
                                                                                                                                                                                                                                                  Description
                                                                                                                                                                                                                                                  Returns the automatically inferred aggregation function for the column.
                                                                                                                                                                                                                                                      Type
                                                                                                                                                                                                                                                      () => boolean
                                                                                                                                                                                                                                                      Description
                                                                                                                                                                                                                                                      Returns whether the column can be grouped.
                                                                                                                                                                                                                                                          Type
                                                                                                                                                                                                                                                          () => number
                                                                                                                                                                                                                                                          Description
                                                                                                                                                                                                                                                          Returns the index of the column in the grouping state.
                                                                                                                                                                                                                                                              Type
                                                                                                                                                                                                                                                              () => boolean
                                                                                                                                                                                                                                                              Description
                                                                                                                                                                                                                                                              Returns whether the column is currently grouped.
                                                                                                                                                                                                                                                                  Type
                                                                                                                                                                                                                                                                  () => () => void
                                                                                                                                                                                                                                                                  Description
                                                                                                                                                                                                                                                                  Returns a function that toggles the grouping state of the column. This is useful for passing to the onClick prop of a button.
                                                                                                                                                                                                                                                                      Type
                                                                                                                                                                                                                                                                      () => void
                                                                                                                                                                                                                                                                      Description
                                                                                                                                                                                                                                                                      Toggles the grouping state of the column.

                                                                                                                                                                                                                                                                          VisibilityColumn

                                                                                                                                                                                                                                                                          Name & DescriptionOption(s)Default
                                                                                                                                                                                                                                                                          Returns whether the column can be hidden.
                                                                                                                                                                                                                                                                            () => boolean
                                                                                                                                                                                                                                                                            Returns whether the column is visible.
                                                                                                                                                                                                                                                                              () => boolean
                                                                                                                                                                                                                                                                              Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to an element.
                                                                                                                                                                                                                                                                                () => (
                                                                                                                                                                                                                                                                                event: unknown,
                                                                                                                                                                                                                                                                                ) => void
                                                                                                                                                                                                                                                                                Toggles the visibility of the column.
                                                                                                                                                                                                                                                                                  (
                                                                                                                                                                                                                                                                                  value?: boolean,
                                                                                                                                                                                                                                                                                  ) => void
                                                                                                                                                                                                                                                                                  Type
                                                                                                                                                                                                                                                                                  () => boolean
                                                                                                                                                                                                                                                                                  Description
                                                                                                                                                                                                                                                                                  Returns whether the column can be hidden.
                                                                                                                                                                                                                                                                                    Type
                                                                                                                                                                                                                                                                                    () => boolean
                                                                                                                                                                                                                                                                                    Description
                                                                                                                                                                                                                                                                                    Returns whether the column is visible.
                                                                                                                                                                                                                                                                                      Type
                                                                                                                                                                                                                                                                                      () => (
                                                                                                                                                                                                                                                                                      event: unknown,
                                                                                                                                                                                                                                                                                      ) => void
                                                                                                                                                                                                                                                                                      Description
                                                                                                                                                                                                                                                                                      Returns a function that can be used to toggle the column visibility. This function can be used to bind to an event handler to an element.
                                                                                                                                                                                                                                                                                        Type
                                                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                                                        value?: boolean,
                                                                                                                                                                                                                                                                                        ) => void
                                                                                                                                                                                                                                                                                        Description
                                                                                                                                                                                                                                                                                        Toggles the visibility of the column.

                                                                                                                                                                                                                                                                                          ColumnPinningColumn

                                                                                                                                                                                                                                                                                          Name & DescriptionOption(s)Default
                                                                                                                                                                                                                                                                                          Returns whether the column can be pinned.
                                                                                                                                                                                                                                                                                            () => boolean
                                                                                                                                                                                                                                                                                            Returns the pinned position of the column. ('left', 'right' or false)
                                                                                                                                                                                                                                                                                              () =>
                                                                                                                                                                                                                                                                                              | false
                                                                                                                                                                                                                                                                                              | 'left'
                                                                                                                                                                                                                                                                                              | 'right'
                                                                                                                                                                                                                                                                                              Returns whether the column is pinned to the left.
                                                                                                                                                                                                                                                                                                () => boolean
                                                                                                                                                                                                                                                                                                Returns whether the column is pinned to the right.
                                                                                                                                                                                                                                                                                                  () => boolean
                                                                                                                                                                                                                                                                                                  Returns the numeric pinned index of the column within a pinned column group.
                                                                                                                                                                                                                                                                                                    () => number
                                                                                                                                                                                                                                                                                                    Pins a column to the 'left' or 'right', or unpins the column to the center if false is passed.
                                                                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                                                                      position:
                                                                                                                                                                                                                                                                                                      | false
                                                                                                                                                                                                                                                                                                      | 'left'
                                                                                                                                                                                                                                                                                                      | 'right',
                                                                                                                                                                                                                                                                                                      ) => void
                                                                                                                                                                                                                                                                                                      Type
                                                                                                                                                                                                                                                                                                      () => boolean
                                                                                                                                                                                                                                                                                                      Description
                                                                                                                                                                                                                                                                                                      Returns whether the column can be pinned.
                                                                                                                                                                                                                                                                                                        Type
                                                                                                                                                                                                                                                                                                        () =>
                                                                                                                                                                                                                                                                                                        | false
                                                                                                                                                                                                                                                                                                        | 'left'
                                                                                                                                                                                                                                                                                                        | 'right'
                                                                                                                                                                                                                                                                                                        Description
                                                                                                                                                                                                                                                                                                        Returns the pinned position of the column. ('left', 'right' or false)
                                                                                                                                                                                                                                                                                                          Type
                                                                                                                                                                                                                                                                                                          () => boolean
                                                                                                                                                                                                                                                                                                          Description
                                                                                                                                                                                                                                                                                                          Returns whether the column is pinned to the left.
                                                                                                                                                                                                                                                                                                            Type
                                                                                                                                                                                                                                                                                                            () => boolean
                                                                                                                                                                                                                                                                                                            Description
                                                                                                                                                                                                                                                                                                            Returns whether the column is pinned to the right.
                                                                                                                                                                                                                                                                                                              Type
                                                                                                                                                                                                                                                                                                              () => number
                                                                                                                                                                                                                                                                                                              Description
                                                                                                                                                                                                                                                                                                              Returns the numeric pinned index of the column within a pinned column group.
                                                                                                                                                                                                                                                                                                                Type
                                                                                                                                                                                                                                                                                                                (
                                                                                                                                                                                                                                                                                                                position:
                                                                                                                                                                                                                                                                                                                | false
                                                                                                                                                                                                                                                                                                                | 'left'
                                                                                                                                                                                                                                                                                                                | 'right',
                                                                                                                                                                                                                                                                                                                ) => void
                                                                                                                                                                                                                                                                                                                Description
                                                                                                                                                                                                                                                                                                                Pins a column to the 'left' or 'right', or unpins the column to the center if false is passed.

                                                                                                                                                                                                                                                                                                                  ColumnSizingColumn

                                                                                                                                                                                                                                                                                                                  Name & DescriptionOption(s)Default
                                                                                                                                                                                                                                                                                                                  Returns true if the column can be resized.
                                                                                                                                                                                                                                                                                                                    () => boolean
                                                                                                                                                                                                                                                                                                                    Returns true if the column is currently being resized.
                                                                                                                                                                                                                                                                                                                      () => boolean
                                                                                                                                                                                                                                                                                                                      Returns the current size of the column.
                                                                                                                                                                                                                                                                                                                        () => number
                                                                                                                                                                                                                                                                                                                        Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.
                                                                                                                                                                                                                                                                                                                          (
                                                                                                                                                                                                                                                                                                                          position?:
                                                                                                                                                                                                                                                                                                                          | false
                                                                                                                                                                                                                                                                                                                          | 'left'
                                                                                                                                                                                                                                                                                                                          | 'right',
                                                                                                                                                                                                                                                                                                                          ) => number
                                                                                                                                                                                                                                                                                                                          Resets the column to its initial size.
                                                                                                                                                                                                                                                                                                                            () => void
                                                                                                                                                                                                                                                                                                                            Type
                                                                                                                                                                                                                                                                                                                            () => boolean
                                                                                                                                                                                                                                                                                                                            Description
                                                                                                                                                                                                                                                                                                                            Returns true if the column can be resized.
                                                                                                                                                                                                                                                                                                                              Type
                                                                                                                                                                                                                                                                                                                              () => boolean
                                                                                                                                                                                                                                                                                                                              Description
                                                                                                                                                                                                                                                                                                                              Returns true if the column is currently being resized.
                                                                                                                                                                                                                                                                                                                                Type
                                                                                                                                                                                                                                                                                                                                () => number
                                                                                                                                                                                                                                                                                                                                Description
                                                                                                                                                                                                                                                                                                                                Returns the current size of the column.
                                                                                                                                                                                                                                                                                                                                  Type
                                                                                                                                                                                                                                                                                                                                  (
                                                                                                                                                                                                                                                                                                                                  position?:
                                                                                                                                                                                                                                                                                                                                  | false
                                                                                                                                                                                                                                                                                                                                  | 'left'
                                                                                                                                                                                                                                                                                                                                  | 'right',
                                                                                                                                                                                                                                                                                                                                  ) => number
                                                                                                                                                                                                                                                                                                                                  Description
                                                                                                                                                                                                                                                                                                                                  Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.
                                                                                                                                                                                                                                                                                                                                    Type
                                                                                                                                                                                                                                                                                                                                    () => void
                                                                                                                                                                                                                                                                                                                                    Description
                                                                                                                                                                                                                                                                                                                                    Resets the column to its initial size.