removing batchCodeTable from UI

This commit is contained in:
frankknoll
2023-04-13 10:25:16 +02:00
parent 4f0806caf6
commit 5c205acd32
7 changed files with 22 additions and 227 deletions

View File

@@ -1,35 +0,0 @@
// adapted from https://datatables.net/examples/api/multi_filter_select.html
class ColumnSearch {
#column;
#select;
constructor(column) {
this.#column = column;
const clazz = this;
$('<br/>').appendTo($(this.#column.header()));
this.#select = $('<select></select>')
.appendTo($(this.#column.header()))
.on(
'change',
function () {
const val = $.fn.dataTable.util.escapeRegex($(this).val());
clazz.#column
.search(val ? '^' + val + '$' : '', true, false)
.draw();
});
}
columnContentUpdated() {
this.#select.empty();
this.#select.append('<option value=""></option>');
const clazz = this;
this.#column
.data()
.unique()
.sort()
.each(function (d, _) {
clazz.#select.append('<option value="' + d + '">' + d + '</option>');
});
}
}