BUG: Colreorder error alert when using data-order attribute on td

BUG: Colreorder error alert when using data-order attribute on td

recre8recre8 Posts: 2Questions: 1Answers: 0
edited June 2022 in Free community support

Link to test case:
https://jsfiddle.net/riaanc/a4q7mprz/4/

Debugger code (debug.datatables.net):
owakel [Before error is shown]

Error messages shown:
DataTables warning: table id=example - Requested unknown parameter '[object Object]' for row 2, column 4. For more information about this error, please see http://datatables.net/tn/4

Description of problem:
When adding a data-order attribute on a <td> Colreorder shows an alert whenever that column is involved in re-ordering. After the alert is shown, all values in the column change to "[object Object]".

In the linked JSFiddle example, drag the Start Date column to see the behaviour. By simply removing the data-order attribute or renaming it to something else like "data123-order", the above behaviour is avoided, but then sorting by the attribute value obviously is no longer respected.

Github issue: https://github.com/DataTables/ColReorder/issues/85

Answers

  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin

    Try the nightly - that should already have this resolved: https://jsfiddle.net/fguq1by4/ .

    Allan

  • recre8recre8 Posts: 2Questions: 1Answers: 0

    Hi Allan

    Still getting the same issue after swapping out all the .js and .css for the nightly builds: Here is the jsfiddle with the updated includes. Try dragging the Start Date column

    https://jsfiddle.net/riaanc/xwybkqpr/

  • elnjensenelnjensen Posts: 12Questions: 4Answers: 0

    I just posted a message about a similar error here.

    I noticed something there that is true of your example table here as well - when reordering columns that do not trigger this error, the columns are not actually reordered. Only the headers are moved. In your example jsfiddle above, try dragging the "Last Name" column header.

  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin

    Sorry I lost track of this thread. I'll loop back to it next week, or over the weekend if I get a chance.

    Allan

Sign In or Register to comment.