aboutsummaryrefslogtreecommitdiff
path: root/web/frontend/data-quality.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/frontend/data-quality.ts')
-rw-r--r--web/frontend/data-quality.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/frontend/data-quality.ts b/web/frontend/data-quality.ts
index 32c3563..20112c0 100644
--- a/web/frontend/data-quality.ts
+++ b/web/frontend/data-quality.ts
@@ -3,6 +3,7 @@ function initDataQuality(): void {
const selectAll = document.getElementById("data-quality-select-all") as HTMLInputElement | null;
const counter = document.getElementById("data-quality-selected");
if (!form || !selectAll) return;
+ const selectAllInput: HTMLInputElement = selectAll;
const checkboxes = Array.from(form.querySelectorAll<HTMLInputElement>("input.data-quality-checkbox"));
function updateCount(): void {
@@ -10,12 +11,12 @@ function initDataQuality(): void {
if (counter) counter.textContent = `${selected} selected`;
const allChecked = selected === checkboxes.length && checkboxes.length > 0;
const noneChecked = selected === 0;
- selectAll!.checked = allChecked;
- selectAll!.indeterminate = !allChecked && !noneChecked;
+ selectAllInput.checked = allChecked;
+ selectAllInput.indeterminate = !allChecked && !noneChecked;
}
- selectAll!.addEventListener("change", () => {
- for (const cb of checkboxes) cb.checked = selectAll!.checked;
+ selectAllInput.addEventListener("change", () => {
+ for (const cb of checkboxes) cb.checked = selectAllInput.checked;
updateCount();
});