DataTableSortHeaderProps
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:11
Props for DataTableSortHeader.
Type Parameters
Section titled “Type Parameters”TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = string
The collection’s field slugs (plus "_creationTime").
Properties
Section titled “Properties”disabled?
Section titled “disabled?”
optionaldisabled?:boolean
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:23
true while a search is active — sort is disabled and shows “Sorted by relevance” (Decision 7).
enableSorting
Section titled “enableSorting”enableSorting:
boolean
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:21
Whether this field has admin.enableSorting: true and an index leading with it (Decision 6). A false value renders plain, unclickable text. Because DataTable’s caller (CollectionListView) already drops unreadable fields from columns entirely, a header only ever reaches this component for a readable field — no separate read-access prop is needed here (Decision 26).
field:
"_creationTime"|TFieldSlug
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:15
The field this header sorts by.
label:
string
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:13
The column’s display label.
onSortChange
Section titled “onSortChange”onSortChange: (
sort) =>void
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:19
Called with the next sort state on click — undefined clears back to defaultView.sort.
Parameters
Section titled “Parameters”{ field: "_creationTime" | TFieldSlug; order: "asc" | "desc"; } | undefined
Returns
Section titled “Returns”void
sort: {
field:"_creationTime"|TFieldSlug;order:"asc"|"desc"; } |undefined
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:17
The list’s current sort, or undefined (falls back to defaultView.sort).
typeHint?
Section titled “typeHint?”
optionaltypeHint?:string
Defined in: packages/react/src/ui/data-table/DataTableSortHeader.tsx:25
Optional field-type hint shown in the header’s tooltip body (DESIGN-NOTES.md §1). Skipped entirely when absent.