From 96a9b4a891d8ed5612bbd0683297b5f7aa715740 Mon Sep 17 00:00:00 2001 From: Guilherme Freire Date: Thu, 7 Jun 2018 19:02:17 -0300 Subject: [PATCH] set option if want order column has checkbox i has a problem to order a column with this library, i fix this with this file --- js/dataTables.checkboxes.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/dataTables.checkboxes.js b/js/dataTables.checkboxes.js index 0ee53fa..d248cfd 100644 --- a/js/dataTables.checkboxes.js +++ b/js/dataTables.checkboxes.js @@ -138,8 +138,7 @@ // var colOptions = { - 'searchable': false, - 'orderable': false + 'searchable': false }; if(ctx.aoColumns[i].sClass === ''){ @@ -148,6 +147,12 @@ colOptions['className'] = ctx.aoColumns[i].sClass + ' dt-checkboxes-cell'; } + if(ctx.aoColumns[i].orderable === true){ + colOptions['orderable'] = true; + } else { + colOptions['orderable'] = false; + } + if(ctx.aoColumns[i].sWidthOrig === null){ colOptions['width'] = '1%'; }