package incr_dom_partial_render

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Default_sort_spec.Sort_dirSource

Sourcetype t =
  1. | Ascending
  2. | Descending
include Sexplib0.Sexpable.S with type t := t
include Ppx_compare_lib.Comparable.S with type t := t
include Table_intf.Sort_dir with type t := t
include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
include Ppx_compare_lib.Comparable.S with type t := t
Sourceval compare : t -> t -> int
Sourceval next : t option -> t option

next cycles through sort directions. This is used to determine how to update the sort direction when a header is clicked on.

indicator, header_class and indicator_class convert the sort direction and precedence of a column from the sort criteria into a string symbol and css classes for the header and the indicator respectively in order to display sort information in the table.

indicator returns a symbol that is displayed in the header of the corresponding column, header_class returns a css class that is assigned to the header element, and indicator_class returns a css class assigned to the indicator itself.

The precedence is always a positive integer (i.e. it starts at 1, not 0).

A column that is not in the sort criteria is assigned an indicator and classes of None.

Examples of suitable indicators are:

  • "▲" (ascending with priority 1)
  • "▲(2)" (ascending with priority 2)
Sourceval indicator : t -> precedence:int -> string option
Sourceval header_class : t -> precedence:int -> string option
Sourceval indicator_class : t -> precedence:int -> string option