Skip to Content
APITanStack TableColDefTanstack

ColDefTanstack type

Tip

This API reference is automatically generated from the source code  of the @jsoc/react-grid-tanstack  package.

View Declaration

export type ColDefTanstack = ColumnDef<GridRow>;

Fields

NameTypeDefault
getUniqueValuesAccessorFn<UJSONObject, unknown[]>
cellColumnDefTemplate<CellContext<UJSONObject, unknown>>
metaColumnMeta<UJSONObject, unknown>
enableHidingboolean
enablePinningboolean

Enables/disables column pinning for this column. Defaults to true.

enableColumnFilterboolean

Enables/disables the column filter for this column.

filterFnFilterFnOption<UJSONObject>

The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function.

enableGlobalFilterboolean

Enables/disables the global filter for this column.

enableMultiSortboolean

Enables/Disables multi-sorting for this column.

enableSortingboolean

Enables/Disables sorting for this column.

invertSortingboolean

Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring

sortDescFirstboolean

Set to true for sorting toggles on this column to start in the descending direction.

sortingFnSortingFnOption<UJSONObject>

The sorting function to use with this column.

  • A string referencing a built-in sorting function
  • A custom sorting function
sortUndefinedfalse | 1 | -1 | "first" | "last"

The priority of undefined values when sorting this column.

  • false
    • Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)
  • -1
    • Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)
  • 1
    • Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)
aggregatedCellColumnDefTemplate<CellContext<UJSONObject, unknown>>

The cell to display each row for the column if the cell is an aggregate. If a function is passed, it will be passed a props object with the context of the cell and should return the property type for your adapter (the exact type depends on the adapter being used).

aggregationFnAggregationFnOption<UJSONObject>

The resolved aggregation function for the column.

enableGroupingboolean

Enables/disables grouping for this column.

getGroupingValue(row: UJSONObject) => any

Specify a value to be used for grouping rows on this column. If this option is not specified, the value derived from accessorKey / accessorFn will be used instead.

enableResizingboolean

Enables or disables column resizing for the column.

maxSizenumber

The maximum allowed size for the column

minSizenumber

The minimum allowed size for the column

sizenumber

The desired size for the column

idstring