Interface ColumnConfig<T>

Type Parameters

  • T = unknown

Hierarchy

  • ColumnConfig

Properties

Cell?: ComponentLike<unknown>

Recommended property to use for custom components for each cell per column. Out-of-the-box, this property isn't used, but the provided type may be a convenience for consumers of the headless table

key: string

the key is required for preferences storage, as well as managing uniqueness of the columns in an easy-to-understand way.

key may be anything if a value is provided, but should be a property-path on each data object passed to the table.

Example

someObj.property.path

Example

someProperty

name?: string

The name or title of the column, shown in the column heading / th

options?: ((context: CellContext<T>) => CellOptions)

Type declaration

    • (context: CellContext<T>): CellOptions
    • Bag of extra properties to pass to Cell via @options, if desired

      Parameters

      • context: CellContext<T>

      Returns CellOptions

pluginOptions?: [Plugin<unknown> | Constructor<Plugin<unknown>, any[]>, (() => unknown)][]

Each plugin may provide column options, and provides similar syntax to how options for the table are specified in the plugins entry,

pluginOptions: [
ColumnVisibility.forColumn(() => ({ isVisible: false })),
StickyColumns.forColumn(() => ({ sticky: 'right' })),
],
value?: ((context: CellContext<T>) => ContentValue)

Type declaration

    • (context: CellContext<T>): ContentValue
    • Optionally provide a function to determine the value of a row at this column

      Parameters

      • context: CellContext<T>

      Returns ContentValue

Generated using TypeDoc