The Sort sub-controller lets you sort the products in a commerce interface.

interface Sort {
    state: SortState;
    isAvailable(criterion: SortCriterion): boolean;
    isSortedBy(criterion: SortCriterion): boolean;
    sortBy(criterion: SortCriterion): void;
    subscribe(listener: () => void): Unsubscribe;
}

Hierarchy (View Summary)

Methods

Properties

state: SortState

A scoped and simplified part of the headless state that is relevant to the Sort sub-controller.