Sorting

Sort panel with two active sorts

Sorting lets you arrange the records in a collection in the order you need. You can build multi-level sorting by adding several sort conditions: records are ordered by the first rule, and any ties are broken by the next rule, and so on.

Main elements

The Sort panel and its controls

  1. Open Sort button Opens the Sort panel. The badge next to the icon shows how many sorts are currently active.
  2. Clear button Removes all sorts at once. The counter is reset accordingly.
  3. Close button Hides the Sort panel without changing the sorts.
  4. Sorting list Each line is a rule that records in the collection are ordered by. Drag the handle on the right to change a rule's priority, or click a line to edit or delete it.
  5. Add sort Adds another sort on top of the existing ones.

Sorting states

A sort rule shown in each of the three states

A sort rule can be in one of the following states:

  1. Active A rule that was added, configured, and confirmed with . Its name is shown in black and it takes part in ordering the records.
  2. Inactive A rule that was added but not confirmed with . Its name is greyed out and no method is shown. It stays in the list but does not affect the order until you open it and confirm. You can activate or delete it at any time.
  3. Editing A rule enters the editing state when you add a new sort or click an existing one. The editing view has two parts: the control buttons (delete or save) and the sorting methods (see Sorting methods). When you add a new sort, the first available method is selected by default.

Editing and removing a sort

Click a rule in the list to open it in editing mode. From there you can:

  • switch the sorting method with the chips below the rule;
  • delete the rule with the trash icon;
  • confirm your changes with .

To change the priority of a rule, drag it by the handle on the right.

Sorting levels

You can use more than one sort. For example, first add a sort by category in alphabetical order, and then a sort by price in descending order. You get products grouped by category, and within each category ordered by decreasing price.

You can add as many sorts as you need.

Adding a sort

Task: sort the products by category so that within each category they are ordered by decreasing price.

  1. Click the Add sort button.

    Empty Sort panel with the Add sort button

  2. Choose the Category field from the list of available fields.

    Choosing the Category field

  3. The new sort opens in editing mode. The first available method, Alphabetical (A → Z), is already selected by default (see Sorting methods). Leave it as is and click to save.

    Category sort in editing mode

  4. The sort is saved. Now add a second sort by price — click Add sort again.

    Category sort saved, ready to add another

  5. Choose the Price field from the list.

    Choosing the Price field

  6. The price sort opens in editing mode. Change the method from Ascending to Descending and click .

    Price sort with the Ascending and Descending methods

  7. Done. The products are now sorted by category, and within each category by decreasing price.

    Two active sorts applied to the collection

On this page