LiveFilter.Components.Boolean (LiveFilter v0.1.8)

Copy Markdown View Source

Boolean dropdown component with three options: Any, Yes, No.

Renders a DaisyUI dropdown with keyboard navigation and proper accessibility. Supports nullable booleans (with "Any" option) and non-nullable (Yes/No only).

Required Assigns

  • filter - The Filter struct containing value (true/false/nil) and config
  • myself - The parent LiveComponent's @myself for event targeting

Events (handled by parent)

  • change_boolean - %{"id" => filter_id, "value" => "true" | "false" | "any"}

Example

<LiveFilter.Components.Boolean.render
  filter={@filter}
  myself={@myself}
/>

Summary

Functions

Renders a boolean dropdown component.

Functions

render(assigns)

Renders a boolean dropdown component.

Attributes

  • filter (:map) (required) - The Filter struct.
  • myself (:any) (required) - The parent LiveComponent's @myself.