Our Confluence App DataTables for Confluence now supports a new option “Order columns” that defines the column(s) the table should be initially sorted by. Also, the table state (sorting, filtering, paging) is saved and restored automatically when viewing the table.
The option “Order columns” supports defining one column or multiple columns as initial sort order. To initially sort the table by one column, just type in the column number (count starts with 1) or to sort by multiple columns a list of column numbers separated by a comma. To reverse the initial sorting (descending instead of ascending), add a “!” (exclamation mark) after the column number. As an example, “2,1!” initially sorts the table by column number 2 (ascending) and then by column number 1 (descending).
By default, DataTables for Confluence now saves the table state (like sorting, filtering, paging) on the client (using the browser’s local storage) and restores the option automatically when the user opens the page again. This feature can be disabled per table with the new macro option “Disable state saving “.