Overview
TherenderSortIcon function renders a visual indicator (arrow icon) showing the sort direction for sortable columns. It displays an up arrow for ascending sort and a down arrow for descending sort.
Signature
Parameters
The sort icon renderer props.
RenderSortIconProps
The current sort direction. Returns
null if undefined (column not sorted).Return Value
An SVG arrow icon pointing up (ASC) or down (DESC), or
null if the column is not sorted.Usage
This function is typically used within custom sort status renderers:Icon Specifications
- SVG viewBox:
0 0 12 8 - Dimensions: 12×8 pixels
- Ascending arrow path:
M0 8 6 0 12 8(points up) - Descending arrow path:
M0 0 6 8 12 0(points down) - Transition: Smooth 0.1s animation when direction changes
- Color: Inherits
currentColorfrom parent
Example
Custom sort status with icon and priority:Styling
The icon has the classrdg-sort-arrow and includes:
fill: currentColor- Inherits text colortransition: d 0.1s- Smooth path animationaria-hidden- Hidden from screen readers
Custom Sort Icons
You can create custom sort icons:Related
- renderSortPriority - Sort priority number renderer
- renderHeaderCell - Default header cell renderer
- Renderers.renderSortStatus - Custom sort status renderer