Macaw.Builtin.Filter (macaw v0.6.0)

Copy Markdown View Source

The built-in filter (spec/05 §6.7), "macaw.filter": a choice of one value of one field, of kind :control, :pure (#452).

  • parameters: label (text, "Filter"), its select's label; none (text, "All"), the words of the option for no value, which clears the filter, "" for no such option;
  • declarations: the event "filter", its value the value chosen; no slots and no default actions: its placement's action sets the state it filters by, %{on: "filter", set: "range", value: {:event, :value}}, a values_from state a derived source or a slot's request reads;
  • choices (Macaw.Control): its options are its state's current legal values, handed by the core, so it offers what the data holds;
  • markup: a labeled native <select>: a GET form over the URL with no socket and the host's links, a live form sending mw-event connected, and the choice as text in :neutral and :print;
  • stylesheet: stylesheet/0, served at stylesheet_path/0, its content address.

Summary

Functions

The filter's one static stylesheet, the controls' own (the shared controls sheet).

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).

Functions

stylesheet()

@spec stylesheet() :: String.t()

The filter's one static stylesheet, the controls' own (the shared controls sheet).

stylesheet_path()

@spec stylesheet_path() :: String.t()

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).