this.#displayControlColumn(country == 'Global')

This commit is contained in:
frankknoll
2023-01-31 08:43:01 +01:00
parent 1c995a4087
commit f1f815f070
2 changed files with 8 additions and 3 deletions

View File

@@ -43,7 +43,7 @@
<body>
<span id="forkongithub"><a href="https://github.com/KnollFrank/HowBadIsMyBatch">Fork me on GitHub</a></span>
<h1>Batch Codes of Coronavirus 2019 Vaccines</h1>
<p style="display: none;">
<p>
<label>Select country:
<select id="countrySelect" name="country">
<option selected="" value="Global">Global</option>

View File

@@ -103,8 +103,9 @@ class BatchCodeTableInitializer {
return json;
})
.then(json => {
this.#_setTableRows(json.data)
this.#setTableRows(json.data);
this.#selectInput();
this.#displayControlColumn(country == 'Global');
});
}
@@ -113,7 +114,7 @@ class BatchCodeTableInitializer {
json.data.forEach(row => row.unshift(null));
}
#_setTableRows(rows) {
#setTableRows(rows) {
this.#batchCodeTable
.clear()
.rows.add(rows)
@@ -126,6 +127,10 @@ class BatchCodeTableInitializer {
input.select();
}
#displayControlColumn(isVisible) {
this.#batchCodeTable.column(this.#getColumnIndex('control')).visible(isVisible);
}
#initializeHistogramView() {
const thisClassInstance = this;
$(`#${this.#batchCodeTableElement[0].id} tbody`).on(