Sortable (array)

array key: sortable

The sortable definition defines which columns are sortable, and links the column header to place sort variables in the query string. There are 2 sort variables that are placed in the query string, orderby which defines the column key to sort on, and order which specifies descending or ascending (asc or desc). The true/false boolean determines whether the first sort will be ascending or descending, true implies the column is sorted ascending and the next sort should be descending, false sets the first sort to ascending. Once the sort is set with the column header the query string variables need to be processed in get_data. List Tables fully rely on the items returned in get_data, note that sorting and paginating do not need to be considering when getting the record count in get_data_count. Only search terms and WHERE clauses need to be considered there for limiting the result set.

The implementation of sorting is done in the example here https://saturntables.com/list-tables/get-data/

$list_table_definitions['sortable'] = array( 'make' => array( 'make', true ), 'model' => array( 'model', false ) );