new SortDescriptor(key [, descending])
Constructor.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
key |
string | the property to sort on |
|
descending |
boolean |
<optional> |
|
Members
-
descending
-
Get the sorting direction.
-
key
-
Get the sort property name.
Methods
-
toUriEncoding( [index] [, propertyName])
-
Get this object as a standard URI encoded (query parameters) string value.
If
index
is provided and non-negative, then the query parameters will be encoded as an array property namedsorts
. Otherwise just barekey
anddescending
properties will be used. Thedescending
property is only added if it istrue
.Parameters:
Name Type Argument Default Description index
number <optional>
an optional array property index
propertyName
string <optional>
sorts an optional array property name, only used if
index
is also providedReturns:
the URI encoded string
- Type
- string