Skip to main content

next_sort

Function next_sort 

Source
pub fn next_sort(current: Option<Sort>, column: usize) -> Sort
Expand description

What a click on column’s heading means: the sorted column reverses, any other column starts ascending.

Starting fresh rather than inheriting the previous column’s direction is the part worth being deliberate about — carrying it over means clicking a new heading can sort it descending, which reads as the table ignoring the click.