IDataTableProvideSort

interface
Component Props

Internal provide/inject contract for column-sort state in <OrigamDataTable> — exposes the current sortBy array and helpers used by column headers to query and toggle sort order.

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.

sortBy
required
Ref<Array<IDataTableSortItem>>
Reactive array of active sort descriptors — each entry has a key and an optional direction.
toggleSort
required
(column: IInternalDataTableHeader) => void
Cycles through the sort states for the given column (none → asc → desc → none when mustSort is false).
isSorted
required
(column: IInternalDataTableHeader) => boolean
Returns true when the given column has an active sort entry in sortBy.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Accessing sort state in a custom header slot

vue