Expand description
Ported from Arc (MIT) © 2026 Elia Kuratli
Reference: Arc源码/arc-library/registry/components/sortable-data-table/sortable-data-table.tsx & .module.css
P6 Component #6: sortable-data-table
- Sortable flat data table with natural numeric/case-insensitive collation, empty values pinned
at the bottom in both ascending and descending directions, subtle sorted-column highlight
tint, and spring-rotating sort arrow (
0° ↔ 180°). - Optional selection column with header tri-state checkbox, row-click selection with
Shiftrange extension,Escapeclear, and animated footer count swap (N selected/N rows).
Structs§
- Data
Column - Column configuration for
SortableDataTable. - Data
Table Row - Row entry for
SortableDataTable. - Sort
State - Active sort state for
SortableDataTable. - Sortable
Data Table - Sortable flat data table with column highlight tint, multi-select & Shift range selection (
sortable-data-table).
Enums§
- Data
Cell Value - Cell value stored in a
DataTableRow. - Sort
Direction - Sort direction (
asc/desc).
Functions§
- sort_
data_ table_ rows - Sorts rows stably while always pinning empty values at the bottom regardless of direction.