dojo.data.util.sorter.createSortFunction
dojo.require("dojo.data.util.sorter");
defined in dojo/data/util/sorter.js
The sort function creation will look for a property on the store called 'comparatorMap'. If it exists it will look in the mapping for comparisons function for the attributes. If one is found, it will use it instead of the basic comparator, which is typically used for strings, ints, booleans, and dates. Returns the sorting function for this particular list of attributes and sorting directions.
Usage
function (sortSpec, store) (view source)
parameter | type | description |
---|---|---|
sortSpec | array A JS object that array that defines out what attribute names to sort on and whether it should be descenting or asending. The objects should be formatted as follows: { attribute: "attributeName-string" || attribute, descending: true|false; // Default is false. } | |
store | object The datastore object to look up item values from. |