Breaking changes in jQuery 4.0.0
Breaking changes in jQuery 4.0.0
$.unique is no longer supported in jQuery 4.0.0 (https://jquery.com/upgrade-guide/4.0/) and is breaking datatables.net v2.3.6 and datatables.net-rowreorder v1.5.0
This question has an accepted answers - jump to answer
Answers
dataTables.rowReorder.js
line 255:
var nodes = $.unique(dt.rows({ page: 'current' }).nodes().toArray());
line 410:
start.nodes = $.unique(dt.rows({ page: 'current' }).nodes().toArray());
line 532:
var endNodes = $.unique(dt.rows({ page: 'current' }).nodes().toArray());
line 649:
var nodes = $.unique(dt.rows({ page: 'current' }).nodes().toArray());
line 844:
var nodes = $.unique(dt.rows({ page: 'current' }).nodes().toArray());
Hi,
Many thanks for noting this. That function isn't used at all in DataTables core or there isn't an issue there, but yes, I see that RowReorder needs an update. I'll see if I can do that tomorrow. Funnily enough, I just finished rewriting RowReorder to work without jQuery. The full release is probably a month or a bit a way though, so a fix would be right as a patch.
Allan
Thanks Allan, really appreciate the quick response
Fix committed here.
I've release RowReorder 1.5.1 with this change, which is now available via the download builder, on the CDN and on npm.
Here is a little example showing it working with jQuery 4.
Thanks again for letting me know about this.
Allan