Styled, overridable sort UI over the headless LiveFilter.Sort helpers.
sort_header/1— a drop-in sortable<th>content cell (tri-state click).sort_menu/1— a standalone "Order by" dropdown.
Both are pure function components: they render markup and emit a DOM event
(default "lf_sort" / "lf_sort_to") that the host LiveView handles by
calling LiveFilter.Sort.toggle/3 (or put/4) and patching the URL. Style via
class, replace the inner markup via the inner slot, or skip these entirely
and build your own header from the LiveFilter.Sort primitives.
Summary
Functions
A sortable table header cell. Place inside your own <th>.
Standalone "Order by" dropdown for single-column sorting (Linear/Notion style).
Functions
A sortable table header cell. Place inside your own <th>.
Attributes
:field(required) - the public sort field atom:label(required) - header text (ignored if an inner block is given):sort(required) - the current%LiveFilter.Sort{}:sortable_fields- theSortFieldlist (used only to echo into the event); optional:event- phx-click event name (default"lf_sort"):target- optional phx-target:class- extra classes on the button
Attributes
field(:atom) (required)label(:string) (required)sort(LiveFilter.Sort) (required)sortable_fields(:list) - Defaults to[].event(:string) - Defaults to"lf_sort".target(:any) - Defaults tonil.class(:string) - Defaults tonil.
Slots
inner_block