Lotus.Web.Queries.WidgetComponent (Lotus Web v0.14.5)

View Source

Renders a single variable widget for the toolbar.

Props:

  • var - %QueryVariable{} or map with keys:
                    :name, :type (:text|:number|:date),
                    :widget (:input|:select|:date),
                    :label, :default, :static_options
  • value - current value override (from @variable_values); falls back to var.default
  • class - extra classes for outer wrapper
  • resolved_options - pre-resolved Phoenix select options [{label, value}] for SQL-based dropdowns;
                    takes precedence over static_options when provided

Summary

Functions

widget(assigns)

Attributes

  • var (:map) (required)
  • value (:any) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • resolved_options (:list) - Defaults to nil.
  • optional (:boolean) - Defaults to false.