diff --git a/static/tocopy/js/flax-search.js b/static/tocopy/js/flax-search.js index 1429ad2..d578a32 100644 --- a/static/tocopy/js/flax-search.js +++ b/static/tocopy/js/flax-search.js @@ -42,18 +42,19 @@ function updateFilteredItems() { document.querySelectorAll(".filter-checkbox:checked") ).map((checkbox) => checkbox.value); - console.log(selectedFilters); - //all the available items const listItems = document.querySelectorAll(".catalog-entry"); // check if any filter is there + console.log(selectedFilters.length) if (selectedFilters.length < 1) { listItems.forEach((el) => { el.classList.add("is-selected"); }); + return } + // for each entry listItems.forEach((item) => { //item is not visible unless