Overview
TherenderHeaderCell function is the default header cell renderer that displays sortable columns with sort indicators. It renders the column name and, for sortable columns, includes visual indicators for sort direction and priority.
Signature
Parameters
The header cell renderer props.
RenderHeaderCellProps
The column object containing configuration like
name, sortable, etc.The current sort direction for this column, if sorted.
The sort priority number for multi-column sorting (1, 2, 3, etc.).
The tab index for keyboard navigation.
Return Value
The rendered header cell content. For non-sortable columns, returns the column name directly. For sortable columns, returns the name wrapped with sort indicators.
Usage
You can use this function as a custom header cell renderer for individual columns:Behavior
- Non-sortable columns: Returns the column name as-is
- Sortable columns: Wraps the column name with sort indicators showing:
- Sort direction arrow (up for ASC, down for DESC)
- Sort priority number (for multi-column sorting)
Example
Using the default header cell renderer with sorting:Related
- renderSortIcon - Sort direction arrow renderer
- renderSortPriority - Sort priority number renderer
- Column.sortable - Column sortable configuration