don't hide secondary category list when sec. category is clicked
This commit is contained in:
parent
4ad4c9344b
commit
cbae4403a0
1 changed files with 10 additions and 9 deletions
|
@ -88,8 +88,9 @@ async function onCategoryClicked(categoryNode,isSecondary = false){
|
|||
|
||||
let secondaryCategoriesNode = document.querySelector("#secondaryCategories");
|
||||
|
||||
if(previousCategory.fileNames.length > 9 && !isSecondary){
|
||||
if(!isSecondary){
|
||||
|
||||
if(previousCategory.fileNames.length > 9){
|
||||
let matchingSecondaries = getSecondaryCategories(previousCategory.fileNames);
|
||||
for(let child of Array.from(secondaryCategories.children)){
|
||||
matchingSecondaries.includes(child.textContent) ? child.classList.remove("hidden") : child.classList.add("hidden")
|
||||
|
@ -99,7 +100,7 @@ async function onCategoryClicked(categoryNode,isSecondary = false){
|
|||
}else{
|
||||
secondaryCategoriesNode.classList.add("hidden");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for(let c of Array.from(document.querySelectorAll(".target"))){
|
||||
previousCategory.fileNames.includes(getText(c)) ? c.classList.remove("hidden") : c.classList.add("hidden");
|
||||
|
|
Loading…
Reference in a new issue