Hi,
please try adding only
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"locale-compare-asc": function ( a, b ) {
return a.localeCompare(b, 'uk', { sensitivity: 'accent' })
},
"locale-compare-desc": function ( a, b ) {
return b.localeCompare(a, 'uk', { sensitivity: 'accent' })
}
});
to the Extension’s JS files (both of them!).
From the other piece of code, only
"columnDefs": [ { "targets": [ 0 ], "type": "locale-compare" } ]
should then be added to the “Custom Commands” text field on the “Edit” screen of the desired table.
This will then turn on this custom sorting method for the first column of the table (because of the 0 in the targets
value).
Regards,
Tobias