PhoenixKitWarehouse. Web. Components. FilterChips
(PhoenixKitWarehouse v0.1.0)
Copy Markdown
View Source
Inline filter input components rendered in a list LiveView's toolbar, one per active filter. Each chip:
- sends
set_filter_value(%{"column_id" => id, "value" => value}) on change, debounced for:text; - sends
clear_filter(%{"column_id" => id}) when the ✕ button is hit; - renders a per-
filter_typeinput (:text/:enum/:numeric_range/:date_range).
All chips are rendered inside their own <form phx-change="set_filter_value">
with a hidden column_id input so the host LiveView's handle_event always
receives both the id and the value.