ColReorder 1.1.0 throws error on dragging (aaData source) :: DT 1.10.0-rc
ColReorder 1.1.0 throws error on dragging (aaData source) :: DT 1.10.0-rc
hgabreu
Posts: 6Questions: 1Answers: 0
ColReorder is throwing an error when I drag any column:
[code]Uncaught TypeError: Cannot read property 'splice' of null[/code]
Here's the link to an example page showing the problem:
https://googledrive.com/host/0BxfBwM8xuKeSdUFMQVQyVGlGS2M/
Not sure if it's relevant, but my data source is an array of arrays.
The relevant part of the unminified code is near line 259 (dataTables.colReorder.js):
[code]
/* Array array - internal data anodes cache */
for ( i=0, iLen=oSettings.aoData.length ; i
[code]Uncaught TypeError: Cannot read property 'splice' of null[/code]
Here's the link to an example page showing the problem:
https://googledrive.com/host/0BxfBwM8xuKeSdUFMQVQyVGlGS2M/
Not sure if it's relevant, but my data source is an array of arrays.
The relevant part of the unminified code is near line 259 (dataTables.colReorder.js):
[code]
/* Array array - internal data anodes cache */
for ( i=0, iLen=oSettings.aoData.length ; i
This discussion has been closed.
Replies
I believe that this has been fixed in ColReorder 1.1.1-dev already - but not yet released (with be will to DataTables 1.10). Can you try the latest code from here please: http://datatables.net/download/build/dataTables.colReorder.nightly.js?_=bd90119aa63b678571ebe289ff5697f7 - which contains that fix.
Allan
Yes, it is fixed. Thanks.
But the same error happens if I pass a reorder array. Either using Dom initialization or new.
[code]
$('#myTable').DataTable({
//other parameters ...
'dom': 'Rlfrtip',
'colReorder': {'order':order},
});
[/code]
You can check the whole code on same link (now using colReorder nightly): https://googledrive.com/host/0BxfBwM8xuKeSdUFMQVQyVGlGS2M/
Sorry for the trouble.
The nightly is now up to date, although it is cached so you might need to modify your include URL for the nightly, or download the nightly to your local server.
Allan