refactoring

This commit is contained in:
frankknoll
2023-04-15 17:15:03 +02:00
parent 5927575ec8
commit 3a77fc63b3
3 changed files with 18 additions and 21 deletions

View File

@@ -1,8 +1,7 @@
class BatchcodeCombinationSelection {
static getSelectBatchcodeCombination({ histograms, onSelect }) {
const selectBatchcodeCombination = UIUtils.instantiateTemplate('template-selectBatchcodeCombination');
const batchcodesSelect = selectBatchcodeCombination.querySelector('#batchcodesSelect');
static configureSelectBatchcodeCombinationElement({ selectBatchcodeCombinationElement, histograms, onSelect }) {
const batchcodesSelect = selectBatchcodeCombinationElement.querySelector('#batchcodesSelect');
this.#addBatchcodeCombinationOptions(batchcodesSelect, histograms);
batchcodesSelect.addEventListener(
'change',
@@ -10,7 +9,6 @@ class BatchcodeCombinationSelection {
const histoDescr = histograms[event.target.value];
onSelect(histoDescr);
});
return selectBatchcodeCombination;
}
static #addBatchcodeCombinationOptions(batchcodesSelect, histograms) {