Skip to content

Commit 5bbf5fc

Browse files
committed
Fix #110: Respect select.info option and avoid displaying selection information if it's disabled.
1 parent b93db66 commit 5bbf5fc

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

js/dataTables.checkboxes.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,20 @@
251251
$table.on('select.dt.dtCheckboxes deselect.dt.dtCheckboxes', function(e, api, type, indexes){
252252
self.onDataTablesSelectDeselect(e, type, indexes);
253253
});
254-
// Disable Select extension information display
255-
dt.select.info(false);
256254

257-
// Update the table information element with selected item summary
258-
//
259-
// NOTE: Needed to display correct count of selected rows
260-
// when using server-side processing mode
261-
$table.on('draw.dt.dtCheckboxes select.dt.dtCheckboxes deselect.dt.dtCheckboxes', function(){
262-
self.showInfoSelected();
263-
});
255+
// If displaying of Select extension information is enabled
256+
if(ctx._select.info){
257+
// Disable Select extension information display
258+
dt.select.info(false);
259+
260+
// Update the table information element with selected item summary
261+
//
262+
// NOTE: Needed to display correct count of selected rows
263+
// when using server-side processing mode
264+
$table.on('draw.dt.dtCheckboxes select.dt.dtCheckboxes deselect.dt.dtCheckboxes', function(){
265+
self.showInfoSelected();
266+
});
267+
}
264268
}
265269

266270
// Handle table draw event

0 commit comments

Comments
 (0)