* Sort the input row data by the given header
(header: Header<Data>)
| 106 | * Sort the input row data by the given header |
| 107 | */ |
| 108 | function sortBy(header: Header<Data>) { |
| 109 | const sortState = { |
| 110 | id: header.id, |
| 111 | direction: |
| 112 | sortByColumn && sortByColumn.id === header.id ? transition(sortByColumn.direction) : DEFAULT_SORT_DIRECTION, |
| 113 | } |
| 114 | setSortByColumn(sortState) |
| 115 | sortRows(sortState) |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Sort the rows of a table with the given column sort state. If the data in the table is sparse, |
nothing calls this directly
no test coverage detected