LiveFilter.Components.QuickFilter (LiveFilter v0.1.0)
View SourceA dynamic filter component that renders the appropriate input based on filter type.
This component automatically detects the filter type and renders the appropriate UI element (text input, select, date picker, etc.) with consistent styling and behavior across all filter types.
Supported Types
:string
- Text input:integer
,:float
- Number input:boolean
- Toggle/checkbox:date
- Date picker:datetime
- DateTime picker:enum
- Single select dropdown:array
- Multi-select dropdown
Usage
<.live_component
module={LiveFilter.Components.QuickFilter}
id="filter-title"
field={:title}
label="Title"
type={:string}
value={@title_filter}
icon="hero-document"
/>
Sends messages to parent LiveView:
{:quick_filter_changed, field, value}
when value changes{:quick_filter_cleared, field}
when filter is cleared