refactoring

This commit is contained in:
frankknoll
2023-06-10 17:59:41 +02:00
parent bb1db4024b
commit 7da9e54305
2 changed files with 4 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ class BatchCodeTableInitializer {
}) })
.then(json => { .then(json => {
this.#setTableRows(batchCodeTable, json.data); this.#setTableRows(batchCodeTable, json.data);
this.#makeCompanyColumnFilterable(batchCodeTable); this.#makeCompanyColumnSearchable(batchCodeTable);
}); });
}); });
} }
@@ -142,8 +142,8 @@ class BatchCodeTableInitializer {
.draw(); .draw();
} }
#makeCompanyColumnFilterable(batchCodeTable) { #makeCompanyColumnSearchable(batchCodeTable) {
const companyColumnFilter = new ColumnSearch(batchCodeTable.column(this.#getColumnIndex('Company'))); const companyColumnSearch = new ColumnSearch(batchCodeTable.column(this.#getColumnIndex('Company')));
companyColumnFilter.columnContentUpdated(); companyColumnSearch.columnContentUpdated();
} }
} }

View File

@@ -1,5 +1,4 @@
// adapted from https://datatables.net/examples/api/multi_filter_select.html // adapted from https://datatables.net/examples/api/multi_filter_select.html
// FK-TODO: rename to ColumnFilter
class ColumnSearch { class ColumnSearch {
#column; #column;