new GridSort()
Used to sort items within a grid. Requires to be nested within a Grid component.
Example
<grid-sort property="provider" header="Provider"></grid-sort>
Methods
(static) clear()
Clears the sorting.
(static) loadDefaultSort()
Loads a specified default sort. This is to ensure a grid applies a sort when first loaded.
(static) restoreState()
Restores the latest saved sort.
(static) saveState()
Stores the sort information to the grid state.
(static) sort(doAscending)
Sorts a list of items in the grid controller by the property for this particular
grid sort.
Parameters:
Name | Type | Description |
---|---|---|
doAscending |
boolean | Sort direction to use |
(static) sortFunc()
Performs a generic sort.
(static) toggleSort()
Toggles the sort. To maintain a consistent interaction, we always set the toggle to ascending
if the sort is not activated. This case would be hit when the user has clicked on the sort for the
first time or after another sort.
(inner) highlight()
Determines whether to highlight sort selected option.
(inner) numberSortFunc()
Handles generic numerical sort.