IDataTableHeader

interface
Data Display

Definition of a single column header in <OrigamDataTable> — key, value accessor, title, alignment, fixed pinning, width/minWidth/maxWidth, sorting callbacks, filter function, mobile visibility, and nested children for multi-row headers.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

key
'data-table-group' | 'data-table-select' | 'data-table-expand' | TAnyString
Unique column identifier. Reserved values trigger built-in columns (group toggle, row select checkbox, row expand toggle).
value
TSelectItemKey<T>
Accessor for the cell value from the row object. Can be a dot-path string, a function, or an array path.
title
string
Display label in the column header cell.
fixed
boolean
Pins the column to the left edge on horizontal scroll.
align
ALIGN.START | ALIGN.END | ALIGN.CENTER
Horizontal text alignment of all cells in this column.
width
number | string
Fixed width for the column (number = px, string = any CSS length).
minWidth
string
Minimum CSS width for the column.
maxWidth
string
Maximum CSS width for the column.
nowrap
boolean
Prevents cell text from wrapping.
headerProps
any
Extra props/attributes spread onto the <th> element.
cellProps
TDataTableHeaderCell
Extra props/attributes spread onto each <td> cell in this column.
sortable
boolean
Enables sorting on this column. Defaults to true when value is defined.
sort
TDataTableCompareFunction
Custom sort comparator applied to resolved cell values.
sortRaw
TDataTableCompareFunction
Custom sort comparator applied to raw row objects.
filter
TFilterFunction
Custom filter function for this column.
mobile
boolean
Whether this column appears in the mobile stacked layout.
children
Array<IDataTableHeader<T>>
Nested sub-columns for multi-row header spans.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Headers with a fixed column and custom sort

typescript