Skip to content

Commit

Permalink
Suppress lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MonilBhavsar committed Dec 9, 2024
1 parent 4bf0ba1 commit 87d5b74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/assets/js/selector.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function syncSelectors(selectedIndex) {
const allSelects = document.querySelectorAll('select');
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < allSelects.length; i++) {
allSelects[i].selectedIndex = selectedIndex;
}
Expand All @@ -19,13 +20,15 @@ function selectOption(select) {
allOptions.forEach((option) => {
if (option.value === selectedValue) {
const toShow = document.getElementsByClassName(option.value);
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < toShow.length; i++) {
toShow[i].classList.remove('hidden');
}
return;
}

const toHide = document.getElementsByClassName(option.value);
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < toHide.length; i++) {
toHide[i].classList.add('hidden');
}
Expand Down

0 comments on commit 87d5b74

Please sign in to comment.