SortGroup
Overview
Renders the active sort order as a strip of removable SortChips, plus a Reset sort control (shown only when the active sort differs from defaultSorted). Each chip toggles its own direction; removing a chip drops that field from the sort (the remove control itself is hidden once only one chip remains, since there is nothing left to remove down to); dragging a chip by its priority ordinal reorders the sort. Adding fields stays with the SortControl add menu; this strip is the always-visible read-out and the primary editing surface, the sort-side counterpart to FilterGroup's chips.
Theme entry: SortGroup
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| themeOverride | String|Object|Array | null | A partial theme object merged with the component's default theme; accepts a class string, class array, or theme object. | |
| sorted | array | [] | Active sort fields; prefix a field name with - for descending. | |
| defaultSorted | array | [] | The server's default sort order, in the same --prefixed representation as sorted. Read only to decide whether Reset sort has anything to do: the control is hidden whenever sorted already matches it. Reset itself emits an empty update:sorted rather than this array, leaving the host to resolve what "the default" means — see the update:sorted event. | |
| fieldDetails | object | {} | Map of field name to field metadata (e.g. { label }) used to derive human labels. | |
| hosted | boolean | false | When true, the chips render as a bare subgroup (no band chrome) for hosting inside a shared ConstraintsBar; the group keeps its own Reset sort control. When false (default), the chips render as a self-contained strip. |
Slots
slot
Scoped slot.
Bindings
| Name | Description |
|---|---|
| name |
Events
| Name | Description |
|---|---|
update:sorted | Emitted when the active sort array changes. Reset sort emits an empty array, which the host reads as "use the default" rather than as "sort by nothing" — a list with no o param is one the server sorts by its own default anyway. useViewList answers it by clearing the stored sort preference and applying defaultSorted; a host that just assigns what it receives clears the sort instead. Emitting defaultSorted here would say the opposite: useViewList would store it as an explicit preference, which is the one thing a default is not. |
Source
client/lib/display/sort/SortGroup.vue