Skip to main content
Version: 11.14.0

Sort Selector

The SortSelectorComponent renders a dropdown for selecting the sort order of search results. It reads available sort options from the application's query configuration and emits the selected choice.

Sort Options Resolution

  1. Tab search: extracts sorting choices from the specific tab configuration.
  2. Regular query: uses sorting choices from the query configuration.
  3. Fallback: returns an empty array if no choices are available.
Flowchart of Sort Options Resolution

Usage

sample.component.ts
import { SortSelectorComponent } from '@sinequa/atomic-angular';

@Component({
selector: 'sample',
imports: [SortSelectorComponent],
template: `<sort-selector [result]="result" (onSort)="onSortChanged($event)" />`,
})
export class SampleComponent {
result = signal<Result | undefined>(undefined);
onSortChanged(sort: SortingChoice) { /* ... */ }
}

API Reference

Inputs

NameTypeRequiredDescription
resultResultThe search result containing the current query and sort state.
positionPlacementDropdown menu position. Default: 'bottom-start'.

Outputs

NameTypeDescription
onSortEventEmitter<SortingChoice>Emitted when the user selects a new sort option.