A <th scope="col"> used inside TableHead.
onSort's presence, not sortDirection, decides whether this renders as a button — a column can
be sortable but currently unsorted (sortDirection omitted or "none"), which still needs the
click target.
tsx
| Name |
|---|
<TableHeaderCell>
...
</TableHeaderCell>Examples
sortDirection mirrors aria-sort directly ("ascending"/"descending"/"none") rather than a
custom enum — a non-sortable column simply omits both props:
tsx
| Name | Status |
|---|---|
| Ada Lovelace | Active |
<tr>
<TableHeaderCell sortDirection="ascending" onSort={() => sortBy("name")}>
Name
</TableHeaderCell>
<TableHeaderCell>Status</TableHeaderCell>
</tr>