jquery-datatables-checkboxes
jquery-datatables-checkboxes copied to clipboard
Support for Responsive extension
Hello guys,
Im use your jQuery DataTables Checkboxes, and responsive environment, this fail.
Thanks for detailed report. I wrote about possible solution to this problem in jQuery DataTables: Responsive extension and form inputs article.
But it feels like plug-in should have the support built in. I will see what could be done about it.
Probably a workaround is move the checkbox to the first row to avoid the re-positioning and then probably this will not crash.
I just ran into this issue in my project. The issue is that the responsive plugin creates a child element, which makes var $cell = $(ctrl).closest('td'); (dataTables.checkboxes.js line 642) not work as intended. To still get the correct value for cellIdx I check the "cell" for the "child" class and get the cellIdx from the closest li instead. var cellIdx = cell.index(); var cellIdx = cell.hasClass('child') ? $(ctrl).closest("li").data('dtr-index') : cell.index();
I only work with the min.js, so here is the fix for that too: d=a.hasClass('child')?k(c).closest("li").data('dtr-index'):n.index().column; instead of d=n.index().column;