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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- 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).
- valueTSelectItemKey<T>
- Accessor for the cell value from the row object. Can be a dot-path string, a function, or an array path.
- titlestring
- Display label in the column header cell.
- fixedboolean
- Pins the column to the left edge on horizontal scroll.
- alignALIGN.START | ALIGN.END | ALIGN.CENTER
- Horizontal text alignment of all cells in this column.
- widthnumber | string
- Fixed width for the column (number = px, string = any CSS length).
- minWidthstring
- Minimum CSS width for the column.
- maxWidthstring
- Maximum CSS width for the column.
- nowrapboolean
- Prevents cell text from wrapping.
- headerPropsany
- Extra props/attributes spread onto the <th> element.
- cellPropsTDataTableHeaderCell
- Extra props/attributes spread onto each <td> cell in this column.
- sortableboolean
- Enables sorting on this column. Defaults to true when value is defined.
- sortTDataTableCompareFunction
- Custom sort comparator applied to resolved cell values.
- sortRawTDataTableCompareFunction
- Custom sort comparator applied to raw row objects.
- filterTFilterFunction
- Custom filter function for this column.
- mobileboolean
- Whether this column appears in the mobile stacked layout.
- childrenArray<IDataTableHeader<T>>
- Nested sub-columns for multi-row header spans.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Headers with a fixed column and custom sort