LiveFilter.Operators (LiveFilter v0.1.8)

Copy Markdown View Source

Human-readable labels and per-type operator option lists for UI display.

Summary

Functions

Returns a human-readable label for the given operator.

Returns operator options as [{atom, String.t()}] tuples for the given filter type.

Returns whether an operator uses single or multi-value selection.

Functions

label(operator)

@spec label(atom()) :: String.t()

Returns a human-readable label for the given operator.

options_for_type(atom)

@spec options_for_type(atom()) :: [{atom(), String.t()}]

Returns operator options as [{atom, String.t()}] tuples for the given filter type.

value_mode(op)

@spec value_mode(atom()) :: :single | :multi

Returns whether an operator uses single or multi-value selection.

Multi-value operators (:in, :not_in, :ov, :cs, :cd) allow selecting multiple values, while single-value operators use a single selection.