refactoring
This commit is contained in:
@@ -127,10 +127,7 @@ class BatchCodeTableInitializer {
|
|||||||
return json;
|
return json;
|
||||||
})
|
})
|
||||||
.then(json => {
|
.then(json => {
|
||||||
this.#batchCodeTable
|
this.#_setTableRows(json.data)
|
||||||
.clear()
|
|
||||||
.rows.add(json.data)
|
|
||||||
.draw();
|
|
||||||
this.#selectInput();
|
this.#selectInput();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -140,6 +137,13 @@ class BatchCodeTableInitializer {
|
|||||||
json.data.forEach(row => row.unshift(null));
|
json.data.forEach(row => row.unshift(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#_setTableRows(rows) {
|
||||||
|
this.#batchCodeTable
|
||||||
|
.clear()
|
||||||
|
.rows.add(rows)
|
||||||
|
.draw();
|
||||||
|
}
|
||||||
|
|
||||||
#selectInput() {
|
#selectInput() {
|
||||||
const input = document.querySelector(".dataTables_filter input");
|
const input = document.querySelector(".dataTables_filter input");
|
||||||
input.focus();
|
input.focus();
|
||||||
|
|||||||
Reference in New Issue
Block a user