DataTables Responsive Recalc Reinitializes Table

DataTables Responsive Recalc Reinitializes Table

luiscabluiscab Posts: 4Questions: 3Answers: 1

I have a simple table in a modal window. When the table is initialized, I recalculate the column width so the table fits properly after it's done loading. However, the api call table.DataTable().responsive.recalc(); is reinitializing the DataTable and throwing an error. More specifically, in the call stack, table.DataTable() is the culprit, taking me from
// For each initialisation we want to give it a clean initialisation
all the way to
function _fnCreateTr ( oSettings, iRow, nTrIn, anTds ) before it gives me the error: DataTables warning: table id="id" - Requested unknown parameter '1' for row 0, column 1. For more information about this error, please see http://datatables.net/tn/4

This only happens when i resize the window and after I have closed the modal and reopened it. The first time the table is open it works fine, resizing and all. Is there something I am missing? The table isn't left in the dom when the modal is closed, the modal and it's contents are removed each time.

This question has an accepted answers - jump to answer

Answers

  • luiscabluiscab Posts: 4Questions: 3Answers: 1
    Answer ✓

    I figured this one out, this was my error. Thanks for this plugin!

Sign In or Register to comment.