Bug 36640: Restore previous order sequence behaviour

There was a behaviour change:
https://datatables.net/upgrade/2#Order-sequence

"""
When ordering columns by clicking on their header element, in v1 it would simply toggle between ascending and descending ordering for the columns (controllable with the columns.orderSequence option). DataTables 2 introduces a new option to this parameter, an empty string value which represents no ordering. The default has been updated to make use of this and the ordering sequence that is applied when clicking the header cell is now:

    Ascending
    Descending
    No order

It will repeat that sequence indefinitely as the column header is clicked. As before, it can be controlled using the columns.orderSequence option, and if you wish to restore the default DataTables 1.x behaviour you can do so by setting the default:

DataTable.defaults.column.orderSequence = ['asc', 'desc'];
"""

This patch restore the behaviour we had before the upgrade.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2024-10-31 10:50:20 +01:00 committed by Katrin Fischer
parent 9bc4d8e40e
commit e76c5c0145
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 2 additions and 1 deletions

View File

@ -70,8 +70,9 @@ var dataTablesDefaults = {
// _dt_add_delay(dt, table_node);
// }
//}
}
},
};
DataTable.defaults.column.orderSequence = ['asc', 'desc'];
function toggledClearFilter(searchText, tableId){
if( searchText == "" ){