Datatables + Scroller causes an Uncaught RangeError

Datatables + Scroller causes an Uncaught RangeError

ladymalieladymalie Posts: 6Questions: 4Answers: 0

I have a code that tries to get the ordered indexes of a table with 300,000+ rows. Thanks to the Scroller extension, there were no problems with the display of the table and its data.

    var ordered = dataTable.api().rows({order: 'applied' }).indexes();

And a code that attempts to get the index of a selected row.

    //this = selected row.
    var currRow = dataTable.api().row(this).index();
    console.log(ordered.indexOf(currRow));

When I run this code, the following error is displayed in the browser console.

Uncaught RangeError: Maximum call stack size exceeded
$a @ datatables-1.10.7.min.js:106
(anonymous function) @ datatables-1.10.7.min.js:108
t.iterator @ datatables-1.10.7.min.js:96
(anonymous function) @ datatables-1.10.7.min.js:108
t.extend.g @ datatables-1.10.7.min.js:99
(anonymous function) @ pcap:276
m.event.dispatch @ jquery-1.11.3.min.js:4
m.event.add.r.handle @ jquery-1.11.3.min.js:4

Does this mean that Datatables can't handle this much rows? Or is there a workaround for this?

This discussion has been closed.