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.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- headersrequiredArray<Array<IInternalDataTableHeader>>
- Resolved header rows (supports multi-row/span headers).
- columnsrequiredArray<IInternalDataTableHeader>
- Flat list of leaf columns, used to iterate cells.
- sortByrequiredUnwrapRef<Ref<Array<IDataTableSortItem>>>
- Current sort configuration (key + direction).
- someSelectedrequiredUnwrapRef<ComputedRef<boolean>>
- True when at least one row is selected (indeterminate state).
- allSelectedrequiredUnwrapRef<ComputedRef<boolean>>
- True when every selectable row is selected.
- toggleSortrequired(column: IInternalDataTableHeader) => void
- Cycles sort direction for the given column.
- selectAllrequired(value: boolean) => void
- Selects or deselects all rows.
- getSortIconrequired(column: IInternalDataTableHeader) => TIcon | undefined
- Returns the icon name matching the column sort direction.
- isSortedrequired(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