Masu.Sort (Masu v0.1.0)

Copy Markdown View Source

An order of a grid's rows: a column, and a direction.

A grid's query holds a list of them, the first the most important: a click on a column's header sorts by that column alone, and a click with Shift adds it to the list.

Summary

Functions

A sort by the column with key, ascending unless direction says.

Types

direction()

@type direction() :: :asc | :desc

t()

@type t() :: %Masu.Sort{direction: direction(), key: String.t()}

Functions

new(key, direction \\ :asc)

@spec new(String.t() | atom(), direction()) :: t()

A sort by the column with key, ascending unless direction says.