New to Kendo UI for Angular? Start a free 30-day trial


Converts the SortDescriptors into a Comparer function that can be used through Array.sort. If multiple descriptors are provided, sorting is applied in a right-to-left order.

import { composeSortDescriptors } from '@progress/kendo-data-query';

const data = [{ name: "Pork" }, { name: "Pepper" }, { name: "Beef" } ];
const comparer = composeSortDescriptors([{ field: "name", dir: "asc" }]);
const result = data.sort(comparer);
// output: [{ name: "Beef" }, { name: "Pepper" }, { name: "Pork" }];


descriptors SortDescriptor[]

The descriptors which will be converted.


Comparer - The produced function.

In this article

Not finding the help you need?