Skip to content

Commit 295cebf

Browse files
committed
Handle true/false column filters #295
Signed-off-by: Steven Esser <[email protected]>
1 parent 8d5918a commit 295cebf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

assets/app/js/controllers/aboutCodeScanDataTable.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,13 @@ class AboutCodeScanDataTable extends Controller {
221221

222222
// If a column search exists, add search for that column
223223
for (let i = 0; i < dataTablesInput.columns.length; i++) {
224-
const columnSearch = dataTablesInput.columns[i].search.value;
224+
let columnSearch = dataTablesInput.columns[i].search.value;
225+
// Handle 'binary' true/false column filters
226+
if (columnSearch === 'true') {
227+
columnSearch = 1;
228+
} else if (columnSearch === 'false') {
229+
columnSearch = 0;
230+
}
225231
if (columnSearch) {
226232
const columnName = dataTablesInput.columns[i].name;
227233
this.dataTable().column(`${columnName}:name`).visible(true);

0 commit comments

Comments
 (0)