DataTables 1.10.4 order parameter bug

DataTables 1.10.4 order parameter bug

hubohubo Posts: 45Questions: 14Answers: 0

Parameter order is causing error if set like order: [0, "desc"] and only work properly when set like: order: [[0, "desc"]].

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Answer ✓

    Thanks for flagging this up - I'll check into it.

    Allan

  • entrecotentrecot Posts: 2Questions: 0Answers: 0

    Any news on this? Seems to be still reproducing on newest release as well as in nightly.

    I don't get it to work with double brackets either.

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

    Double brackets is the way forward here. The single bracket option is not supported at this time.

    If you can't getting the double brackets to work, please link to a test case showing the issue so it can be debugged.

    Allan

  • entrecotentrecot Posts: 2Questions: 0Answers: 0

    I created a JSFiddle, hope it works:
    http://jsfiddle.net/yv1v53w9/8/

    ColumnDefs orderData is the one causing problems. I understand from DataTables example that this should be allowed in API.

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

    The statement in the example is misleading I'm afraid. I will correct it.

    As the columns.orderData reference documentation notes the orderData parameter can be an integer or an array of integers.

    Allan

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

    Fixed here and will be deployed to the site soon.

This discussion has been closed.