Cinder.Renderers.SortControls (Cinder v0.12.1)

Copy Markdown View Source

Shared sort controls component for List and Grid renderers.

Renders a button group for sorting since these layouts don't have table headers.

Summary

Functions

Returns true if any columns are sortable.

Renders sort controls as a button group.

Functions

has_sortable_columns?(columns)

Returns true if any columns are sortable.

render(assigns)

Renders sort controls as a button group.

Required assigns

  • columns - List of column definitions
  • sort_by - Current sort state (list of {field, direction} tuples)
  • sort_label - Label for the sort controls (e.g., "Sort by:")
  • theme - Theme configuration map
  • myself - LiveComponent reference for event targeting