Skip to content

Home > @liquidrazor/list-display > FieldSchema

FieldSchema interface

Column/field definition for the list.

Signature:

typescript
export interface FieldSchema<TRow = any, TValue = any>

Properties

Property

Modifiers

Type

Description

align?

FieldAlign

(Optional) Text / cell alignment.

cellRenderer?

(row: TRow, value: TValue, ctx: CellRenderContext<TRow>) => ReactNode

(Optional) Optional custom renderer for the cell.

cellStyle?

(row: TRow, value: TValue) => CSSProperties

(Optional) Dynamic style for the cell (e.g. based on status).

filter?

FieldFilterConfig<TRow, TValue>

(Optional) Filter configuration for this column.

headerStyle?

CSSProperties

(Optional) Optional header cell style.

id

keyof TRow & string

Property name on the row object.

label

string

Label shown in the header.

minWidth?

number | string

(Optional) Minimum width for the column.

sortable?

boolean

(Optional) Whether the column can be sorted.

width?

number | string

(Optional) Preferred width (px, %, etc).