SortChip
Overview
Renders a single active sort field as a removable pill. A leading priority ordinal (shown only when showOrdinal is set) doubles as the drag handle for reordering within the host strip. The label segment shows the field's human label and a direction glyph; clicking it toggles ascending/descending. The trailing segment removes the field from the sort, and is present only when removable is set. This is the sort-side counterpart to FilterChip: neutral-tinted, since ordering is not a predicate and the accent is reserved for filters, actions, and selection.
Theme entry: SortChip
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| iconOverride | Object | null | A partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants. | |
| 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. | |
| field | string | yes | Sort entry to render, e.g. "updated" (ascending) or "-updated" (descending). | |
| index | number | yes | Zero-based position in the sort order; the displayed priority ordinal is index + 1. | |
| fieldDetails | object | {} | Map of field name to field metadata (e.g. { label }) used to derive the human label. | |
| showOrdinal | boolean | true | Show the priority ordinal. The ordinal doubles as the drag handle, so it is shown only when reordering is meaningful (more than one active sort field). The host strip (SortGroup) passes false for a lone chip. | |
| removable | boolean | true | Show the remove ("x") control. The host strip (SortGroup) passes false for a lone chip, so the last active sort field can't be removed from the chip itself — clearing it would leave the strip with no chips to read the sort from, while the server would still sort by its own default. Reset sort is the way back instead. |
Slots
| Name | Scoped | Description |
|---|---|---|
drag-handle | Override the drag-handle glyph. |
Events
| Name | Description |
|---|---|
toggle | Emitted when the label segment is clicked to flip this field's direction. |
remove | Emitted when the remove segment is clicked. |
Source
client/lib/display/sort/SortChip.vue