RecordsetSort Class
yui3/src/recordset/js/recordset-sort.js:10
Parent Module: recordset
Plugin that adds default and custom sorting functionality to the Recordset utility
Index
Methods
Attributes
Methods
_defSortFn
()
private
Method that all sort calls go through. Sets up the lastSortProperties object with the details of the sort, and passes in parameters to the "defaultSorter" or a custom specified sort function.
flip
()
public
Sorts the recordset based on the last-used sort parameters, but flips the order. (ie: Descending becomes ascending, and vice versa).
initializer
()
protected
Sets up the default function to use when the "sort" event is fired.
resort
()
public
Resorts the recordset based on the last-used sort parameters (stored in 'lastSortProperties' ATTR)
reverse
()
public
Reverses the recordset calling the standard array.reverse() method.
sort
-
field
-
desc
Sorts the recordset.
Parameters:
-
field
StringA key to sort by.
-
desc
BooleanTrue if you want sort order to be descending, false if you want sort order to be ascending