Skip to content

SortControl

Overview

Toolbar entry point for multi-field sorting. The trigger opens an add-field menu of the sortable fields not yet in the sort, presented by ResponsiveMenu (a popover on desktop, a full-screen dialog on mobile). Picking a field appends it to the sort; the menu stays open so several fields can be added in a row. Reordering, direction, and removal happen on the active-sort chips (see SortGroup / SortChip), so this control is add-only. The trigger teleports into a toolbar zone supplied by the host view. This is the layout-independent companion to column-header sorting; both write the same sorted array.

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
sortablesarray[]Array of field names that can be added as sort criteria.
sortedarray[]Currently active sort fields; prefix a field name with - to indicate descending order.
fieldDetailsobject{}Map of field name to field metadata (e.g. { label }) used to derive human-readable labels.
triggerTargetobject|stringnullElement (or selector) the trigger teleports into. When falsy, the trigger renders in place.
labelstring"Sort"Trigger label text.

Events

NameDescription
update:sortedEmitted when the active sort array changes.

Full event reference

Source

client/lib/display/sort/SortControl.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2