refactoring
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user