diff --git a/lib/builder.js b/lib/builder.js index 0c1c2b4..2b7269f 100644 --- a/lib/builder.js +++ b/lib/builder.js @@ -149,7 +149,7 @@ module.exports = function (options) { customColumns = _u.isArray(self.aSearchColumns) && !_u.isEmpty(self.aSearchColumns) && global; _u.each(customColumns ? self.aSearchColumns : requestQuery.columns, function(column){ - if (customColumns || column.searchable === 'true'){ + if (customColumns || (typeof column.searchable === 'boolean' && column.searchable) || column.searchable === 'true'){ var colName = sanitize(customColumns ? column : column.name), searchVal = sanitize(global ? requestQuery.search.value : column.search.value); @@ -196,7 +196,7 @@ module.exports = function (options) { var order = requestQuery.order[fdx], column = requestQuery.columns[order.column]; - if (column.orderable === 'true' && column.name) { + if (((typeof column.orderable === 'boolean' && column.orderable) || column.orderable === 'true') && column.name) { query.push(column.name + " " + order.dir); } }