Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/data/util/sorter.js

  • Provides:

    • dojo.data.util.sorter
  • dojo.data.util.sorter.basicComparator

    • parameters:
      • a: (typeof anything)
      • b: (typeof anything)
    • returns
      int {-1,0,1}
    • summary
      Basic comparision function that compares if an item is greater or less than another item
    • description
      returns 1 if a > b, -1 if a < b, 0 if equal.
      'null' values (null, undefined) are treated as larger values so that they're pushed to the end of the list.
      And compared to each other, null is equivalent to undefined.
    • alias - dojo.data.util.sorter.basicComparator
    • type
      Function
  • dojo.data.util.sorter.createSortFunction

    • parameters:
      • sortSpec: (typeof attributes)
        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: &quot;attributeName-string&quot; || attribute,
        descending: true|false;   // Default is false.
        }
      • store: (typeof dojo.data.core.Read)
        object The datastore object to look up item values from.
    • summary
      Helper function to generate the sorting function based off the list of sort attributes.
    • description
      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.
    • type
      Function
  • dojo.data.util.sorter

    • type
      Object
  • dojo.data.util

    • type
      Object
  • dojo.data

    • type
      Object
  • dojo

    • type
      Object