IDataTableHeadersSlotProps

interface
Data Table

Slot props injected into the DataTable headers slot — provides column definitions, sort state, selection state, and helpers to toggle sort, select-all, and retrieve the sort icon.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

headers
required
Array<Array<IInternalDataTableHeader>>
Resolved header rows (supports multi-row/span headers).
columns
required
Array<IInternalDataTableHeader>
Flat list of leaf columns, used to iterate cells.
sortBy
required
UnwrapRef<Ref<Array<IDataTableSortItem>>>
Current sort configuration (key + direction).
someSelected
required
UnwrapRef<ComputedRef<boolean>>
True when at least one row is selected (indeterminate state).
allSelected
required
UnwrapRef<ComputedRef<boolean>>
True when every selectable row is selected.
toggleSort
required
(column: IInternalDataTableHeader) => void
Cycles sort direction for the given column.
selectAll
required
(value: boolean) => void
Selects or deselects all rows.
getSortIcon
required
(column: IInternalDataTableHeader) => TIcon | undefined
Returns the icon name matching the column sort direction.
isSorted
required
(column: IInternalDataTableHeader) => boolean
Returns true if the column is part of the active sort.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Custom header slot leveraging IDataTableHeadersSlotProps

html