Skip to content

Commit c83898a

Browse files
committed
Add exactFilterColumnNames excludes list to scanDataTable queries
Signed-off-by: Steven Esser <[email protected]>
1 parent 0bdc3ba commit c83898a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/app/js/controllers/scanDataTable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ class ScanDataTable extends Controller {
242242
if (columnSearch) {
243243
const columnName = dataTablesInput.columns[i].name;
244244
this.dataTable().column(`${columnName}:name`).visible(true);
245+
const exactFilterColumnNames = ['extension', 'programming_language', 'name'];
245246

246247
if (i === 0) {
247248
// Column 0 is the "path", which should only match
@@ -275,8 +276,7 @@ class ScanDataTable extends Controller {
275276
{ $eq: null }
276277
]
277278
};
278-
// FIXME: This should probalby be a list if any more vales are added
279-
} else if (columnName === 'extension' || columnName === 'programming_language' || columnName === 'name') {
279+
} else if (exactFilterColumnNames.includes(columnName)) {
280280
query.where.$and[columnName] = {
281281
$eq: columnSearch
282282
};

0 commit comments

Comments
 (0)