0

Im using jQuery DataTables plugin. With this response I know how to initialize the table without any particular order (ordering com from server).

Now, I need to clear the table ordering. Using the order method from API I can apply order to the first column, i.e:

api.order([0,0]);

But doing this :

api.order([]);

Get this error:

Uncaught TypeError: Cannot read property 'aDataSort' of undefined

How can restore the original "no order" state of the table?

Community
  • 1
  • 1
Sebastián Guerrero
  • 1,055
  • 1
  • 19
  • 26
  • You cannot do it this way, through the API. params for `order()` (or `fnSort()`) **must** be a valid column index and a valid sort type. – davidkonrad Jul 10 '16 at 12:53
  • @davidkonrad so, no way to reload data from server without ordering? – Sebastián Guerrero Jul 10 '16 at 13:04
  • ?? Where are you reloading data? Just saying that you cannot reset the ordering to none or "no order" by using `order()`. You can set the `ordering` with `order()`, but not _unset_ it. – davidkonrad Jul 10 '16 at 16:52

0 Answers0