order() documentation error?

order() documentation error?

vogomatixvogomatix Posts: 38Questions: 3Answers: 7
edited July 2014 in DataTables 1.10

I believe the order() method is incorrectly documented (or incorrecly implemented, depending on how you look at it :-) )

Instead of returning a Datatable API instance, order() on its own appears to return an array containing as element 0 an array of the sort terms applied to each column.

From Chrome:

myOrder: Array[1]
  0: Array[2]
    0: 1
    1: "asc"
    _idx: 0
    length: 2
    __proto__: Array[0]
  length: 1
  __proto__: Array[0]

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    Thanks for pointing that out! You are quite correct - order() without parameters returns an array, but it is incorrectly documented as an Api instance at the moment. I've got a fix locally and I'll push an update out shortly!

    Regards,
    Allan

This discussion has been closed.