refactoring

This commit is contained in:
frankknoll
2023-01-25 11:33:22 +01:00
parent 7ef46c8ee3
commit 7c520c8f64

View File

@@ -127,10 +127,7 @@ class BatchCodeTableInitializer {
return json;
})
.then(json => {
this.#batchCodeTable
.clear()
.rows.add(json.data)
.draw();
this.#_setTableRows(json.data)
this.#selectInput();
});
}
@@ -140,6 +137,13 @@ class BatchCodeTableInitializer {
json.data.forEach(row => row.unshift(null));
}
#_setTableRows(rows) {
this.#batchCodeTable
.clear()
.rows.add(rows)
.draw();
}
#selectInput() {
const input = document.querySelector(".dataTables_filter input");
input.focus();