Untitled

Sorting allows you to arrange records in a collection in the desired order. You can do multi-level sorting by adding several sorting conditions.

Main elements

https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/6abbabf3-2e88-4be0-a0c9-802f95773d3f/Untitled.png

  1. Open Sorting Button Opens the sidebar. Also, it has a counter that reflects the number of active sorts.
  2. Clear Button Clears the sorting modal. Accordingly, the counter is reset.
  3. Sorting List Each line is a rule by which records in the collection are sorted. You can selectively delete the sorting by calling up the context menu and clicking on delete.
  4. Adding a new sort Clicking on add sort allows you to add a new sort to the existing ones.

Sorting state

https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/6278e045-284e-4e04-be7a-bb2ef10613ab/Untitled.png

Sort can be in the following states:

  1. Active The sort that was added, configured, and activated by clicking during editing. Participates in sorting.
  2. Inactive The sort that was added. But the button was not pressed. Such a sort has its name colored in gray and in it the method of sorting (for example, Sale. Such a sort is displayed in the list, but does not participate in the sorting of collection records. They can always be opened, configured, and activated. Or deleted through the context menu.
  3. Editing The sort enters the editing state when adding a new sort or when clicking on an existing one. The editing screen consists of 2 functional parts: control buttons (you can delete or save), sorting methods (see Sorting methods ). When adding a new sort, the first available sorting method is selected by default.

Opening the context menu

The context menu of the sorting line is opened by clicking on the grip icon. Right now there only the delete option.

Sorting levels

You can use more than one sort. For example, first add a sort by brands in alphabetical order, and then a sort by price in descending order. We get products sorted by brands, and within the brand, products are sorted by decreasing price.

You can add as many sorts as you want.

Adding a sort

Task: Sort the products by categories, so that within each brand the products are sorted by decreasing price.

  1. Click on the add sort button

    https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/1c47159c-013c-42fb-a1ce-73b62e32a309/Untitled.png

  2. Choose from the available fields the Category field for sorting.

    https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/93ddc100-f3b9-49b2-bd3c-c0c2baa5f6fd/Untitled.png

  3. The added sort goes into editing mode. By default, the first available sorting method (Alphabetical (A→Z) is already selected (see Sorting methods ). We leave this option and click to save.

    https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/3739753a-d894-4b4b-947a-875ce9f72453/Untitled.png

  4. The sort is saved. Now we need to add a second sort by price. Click on add sort.

    https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/541edcd8-199d-4e98-81c3-ffcf04ae61fe/Untitled.png

  5. Choose the Price field from the list.

    https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/ee79e891-1191-468e-817d-3a11bfefd23b/Untitled.png

  6. Added a sort by price. Change the sorting method from Ascending to Descending and click .

    https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/ce72c6bb-0e74-449a-ac95-97dd30d22121/Untitled.png

  7. Done. Sorted products by brands and within brands by decreasing price.

    https://prod-files-secure.s3.us-west-2.amazonaws.com/77b19e1f-fa29-4251-a818-bada7857b56b/3c692c17-5e21-4e4d-a57a-6e778d7066d5/Untitled.png

<aside> 🔖 Read more on this topic ——————————— Filter Filtering methods Sorting methods Visibility

</aside>