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).
Type Parameters
Section titled “Type Parameters”TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = string
Parameters
Section titled “Parameters”DataTableSortHeaderProps<TFieldSlug>
Component props. See DataTableSortHeaderProps.
Returns
Section titled “Returns”Element
A sortable header button, or plain text when sorting is unavailable.