sort
To enable the sorting plugin. Sort has two config objects:
- Generic config: to enable sort for all columns, enable multi column sort, server-side integration, etc.
- Column specific config: to enable sort on a specific column, to set custom comparator function, etc.
#
Generic sort configoptional
- Type:
boolean
orGenericSortConfig
- Example: Sorting
GenericSortConfig
type has the following properties:
Name | Description | Type |
---|---|---|
enabled | to enable/disable sorting | boolean |
multiColumn optional | Enable/disable multi column sort | boolean |
server optional | Server-side integration | ServerConfig |
To simply enable sort for all columns:
To disable multi column sorting:
#
Column specific sort configoptional
- Type:
boolean
orSortConfig
- Example: Custom sort
SortConfig
type has the following properties:
Name | Description | Type |
---|---|---|
enabled | to enable/disable pagination | boolean |
compare optional | custom comparator function | Comparator<TCell> |
To disable sort on a specific column:
Or to use a custom comparator on a column: