jquery-datatables-checkboxes icon indicating copy to clipboard operation
jquery-datatables-checkboxes copied to clipboard

Support for Responsive extension

Open rodriguez90 opened this issue 6 years ago • 3 comments

Hello guys, Im use your jQuery DataTables Checkboxes, and responsive environment, this fail. imagen

imagen

imagen

imagen

rodriguez90 avatar Nov 17 '18 18:11 rodriguez90

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.

mpryvkin avatar Nov 17 '18 19:11 mpryvkin

Probably a workaround is move the checkbox to the first row to avoid the re-positioning and then probably this will not crash.

lestcape avatar Mar 21 '19 17:03 lestcape

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;

JosiaBelow avatar Mar 06 '24 16:03 JosiaBelow