Custom columns sort
Usage
ag_col_sort(
x,
columns = NULL,
sortable = NULL,
sort = NULL,
initialSort = NULL,
sortIndex = NULL,
initialSortIndex = NULL,
sortingOrder = NULL,
comparator = NULL,
unSortIcon = NULL,
...
)
Arguments
- x
aggrid Object
- columns
Specify the column to modify, Default is all columns.
- sortable
Set to true to allow sorting on this column.
- sort
If sorting by default, set it here. Set to asc or desc. More details
- initialSort
Same as sort, except only applied when creating a new column. Not applied when updating column definitions. More details
- sortIndex
If sorting more than one column by default, specifies order in which the sorting should be applied.
- initialSortIndex
Same as sortIndex, except only applied when creating a new column. Not applied when updating column definitions.
- sortingOrder
Array defining the order in which sorting occurs (if sorting is enabled). An array with any of the following in any order 'asc','desc',null.
- comparator
Override the default sorting order by providing a custom sort comparator. valueA, valueB are the values to compare. nodeA, nodeB are the corresponding RowNodes. Useful if additional details are required by the sort. isDescending - true if sort direction is desc. Not to be used for inverting the return value as the grid already applies asc or desc ordering.
- unSortIcon
Set to true if you want the unsorted icon to be shown when no sort is applied to this column.
- ...
please see https://www.ag-grid.com/javascript-data-grid/column-properties/.