Skip to content

DataTableSortHeader

DataTableSortHeader<TFieldSlug>(props): Element

Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:41

A clickable TanStack Table column header that cycles a field’s sort state: unsorted → asc → desc → unsorted (clears sort, falling back to defaultView.sort).

Renders as plain, unclickable text when enableSorting is false (the field has no leading index, Decision 6) or disabled is true (a search is active, Decision 7 — parked sort, shown with a “Sorted by relevance” tooltip).

TFieldSlug extends string = string

DataTableSortHeaderProps<TFieldSlug>

Component props. See DataTableSortHeaderProps.

Element

A sortable header button, or plain text when sorting is unavailable.