Skip to content

DataTableSortHeaderProps

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

Props for DataTableSortHeader.

TFieldSlug extends string = string

The collection’s field slugs (plus "_creationTime").

optional disabled?: 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: 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: (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.

{ field: "_creationTime" | TFieldSlug; order: "asc" | "desc"; } | undefined

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).


optional typeHint?: 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.