Skip to content
Entangle UI v0.13.0

DataTableColumn

Defined in: src/components/data/DataTable/DataTable.types.ts:26

Description of a single column.

R is the row data type.

accessor may be a string (key of R) or a function returning the cell value. When omitted, id is used as a key into R if it matches a key, otherwise the cell is empty.

R

optional accessor?: keyof R | ((row, rowIndex) => unknown)

Defined in: src/components/data/DataTable/DataTable.types.ts:32

How to read the cell value from a row.


optional align?: DataTableAlign

Defined in: src/components/data/DataTable/DataTable.types.ts:59

Cell horizontal alignment.

"left"

optional ariaHidden?: boolean

Defined in: src/components/data/DataTable/DataTable.types.ts:65

When false, the column header is not focusable for keyboard users.


optional cell?: (info) => ReactNode

Defined in: src/components/data/DataTable/DataTable.types.ts:38

Cell renderer. Receives the resolved value and the row. When omitted, the value is rendered with String(value) (or empty for null/undefined).

DataTableColumn<R>

R

number

unknown

ReactNode


optional className?: string

Defined in: src/components/data/DataTable/DataTable.types.ts:61

Per-column className.


optional disableResize?: boolean

Defined in: src/components/data/DataTable/DataTable.types.ts:67

When true, this column cannot be resized even if resizableColumns is on.


optional header?: ReactNode

Defined in: src/components/data/DataTable/DataTable.types.ts:30

Header content (string or any node).


id: string

Defined in: src/components/data/DataTable/DataTable.types.ts:28

Stable column identifier. Required.


optional maxWidth?: number

Defined in: src/components/data/DataTable/DataTable.types.ts:49

Maximum column width in px (used for resizing).


optional minWidth?: number

Defined in: src/components/data/DataTable/DataTable.types.ts:47

Minimum column width in px (used for resizing).


optional sortable?: boolean

Defined in: src/components/data/DataTable/DataTable.types.ts:51

When true, header click toggles sort on this column.


optional sortComparator?: (a, b, rowA, rowB) => number

Defined in: src/components/data/DataTable/DataTable.types.ts:57

Custom comparator. Receives the resolved cell values for two rows. Default: localeCompare for strings, < for numbers, Date, null/undefined ordered last.

unknown

unknown

R

R

number


optional sticky?: boolean

Defined in: src/components/data/DataTable/DataTable.types.ts:63

When true, this column sticks to the left edge while scrolling.


optional width?: string | number

Defined in: src/components/data/DataTable/DataTable.types.ts:45

Fixed column width (px or any CSS dimension).