Skip to content

ColumnDef

ColumnDef<T> = object

Defined in: packages/ui/src/types.ts:386

Full column definition for DataTableProps and DetailViewProps.

Specifies the column key, display label, sorting behavior, custom cell rendering, and responsive priority. When a Drizzle table is provided, column metadata (label, type-appropriate renderer) is inferred automatically; use ColumnDef to override those defaults.

ColumnShorthand for the shorthand form (plain string key).

T = unknown

The row object type for type-safe render callbacks.

key: string

Defined in: packages/ui/src/types.ts:388

Property key on the row object.


optional label: string

Defined in: packages/ui/src/types.ts:390

Human-readable column header label.


optional priority: number

Defined in: packages/ui/src/types.ts:398

Responsive priority; lower numbers stay visible on small screens.


optional render: (value, row) => ReactNode

Defined in: packages/ui/src/types.ts:394

Custom render function for the cell value.

unknown

T

ReactNode


optional sortable: boolean

Defined in: packages/ui/src/types.ts:392

Whether this column supports sorting. Defaults to true.


optional width: string | number

Defined in: packages/ui/src/types.ts:396

Fixed column width (CSS value or pixel number).