How to disable sorting by jQuery.DataTables init?

Has anyone tried DataTables , when I bind (init) it to <table> , the data is sorted.

Can I disable default sorting?

+6
source share
2 answers

According to the DataTabe reference guide , this should work:

 $('#example').dataTable({ "aaSorting": [] }); 
+13
source

try the following:

 $(document).ready(function () { $('#example').dataTable({ "order": [[3, "desc"]] }); }); 
0
source

Source: https://habr.com/ru/post/904431/


All Articles