Skip to content

Commit 2f48fab

Browse files
committed
Fixed issue with tables where data source is other than Ajax
1 parent e5b96c0 commit 2f48fab

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

js/dataTables.checkboxes.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/*! Checkboxes 1.2.3
1+
/*! Checkboxes 1.2.4
22
* Copyright (c) Gyrocode (www.gyrocode.com)
33
* License: MIT License
44
*/
55

66
/**
77
* @summary Checkboxes
88
* @description Checkboxes extension for jQuery DataTables
9-
* @version 1.2.3
9+
* @version 1.2.4
1010
* @file dataTables.checkboxes.js
1111
* @author Gyrocode (http://www.gyrocode.com/projects/jquery-datatables-checkboxes/)
1212
* @contact http://www.gyrocode.com/contacts
@@ -162,6 +162,16 @@ Checkboxes.prototype = {
162162
// WORKAROUND: Detach all event handlers for this column
163163
$colHeader.off('.dt');
164164

165+
// If table has data source other than Ajax
166+
if(ctx.sAjaxSource === null){
167+
// WORKAROUND: Invalidate column data
168+
var cells = dt.cells('tr', i);
169+
cells.invalidate('data');
170+
171+
// WORKAROUND: Add required class to existing cells
172+
$(cells.nodes()).addClass(colOptions['className']);
173+
}
174+
165175

166176
//
167177
// DATA

0 commit comments

Comments
 (0)