DataTables 1.10.1 and ColReorder 1.1.2 order error

DataTables 1.10.1 and ColReorder 1.1.2 order error

hubohubo Posts: 45Questions: 14Answers: 0

When I set .dataTable({ order: [0, "desc"] }) and there is no saved state, I get an error "columns[oState.order[i][0]] is undefined" in ColReorder-1.1.2.js at line 792: oState.order[i][0] = columns[ oState.order[i][0] ]._ColReorder_iOrigCol;

This question has an accepted answers - jump to answer

Answers

  • hubohubo Posts: 45Questions: 14Answers: 0

    DataTables 1.10.2 still suffers with this problem.

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin
    Answer ✓

    As a workaround, pass in the order option as a 2D array at the moment - i.e. [[ 0, 'desc' ]] and that should allow it to work.

    I had thought I'd changed DataTables to stop this error before, but obviously not. I'll try and get a proper fix.

    Allan

This discussion has been closed.