pub trait SortCycle: 'static {
// Required method
fn next_sort(
&self,
context: &SortCycleContext<'_>,
) -> Vec<(ColumnIx, SortDirection)>;
}Expand description
How a header click changes the sort.
The default is StandardSortCycle: ascending, descending, unsorted;
Shift adds the column to a multi-column sort. Called once per click on
the UI thread, and only for a column with
GridColumn::is_sortable. The grid
drops repeated columns of the result (the first one stays) and columns
outside the schema’s column type.
Required Methods§
Sourcefn next_sort(
&self,
context: &SortCycleContext<'_>,
) -> Vec<(ColumnIx, SortDirection)>
fn next_sort( &self, context: &SortCycleContext<'_>, ) -> Vec<(ColumnIx, SortDirection)>
The sort after a click on context.column(), most significant column
first; empty for the insertion order.