Skip to content

Commit

Permalink
Keep selected FX while searching
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek committed Nov 15, 2024
1 parent 271a07a commit 8c5e0cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2850,7 +2850,7 @@ function search(field, listId = null) {
if (listId!=='pcont' && i===0) return;
const listItemName = listItem.querySelector('.lstIname').innerText.toUpperCase();
const searchIndex = listItemName.indexOf(field.value.toUpperCase());
listItem.style.display = (searchIndex < 0) ? 'none' : '';
listItem.style.display = (searchIndex < 0) && !listItem.classList.contains("selected") ? 'none' : '';
listItem.dataset.searchIndex = searchIndex;
});

Expand Down Expand Up @@ -2924,7 +2924,7 @@ function filterFx() {
const listItemName = listItem.querySelector('.lstIname').innerText;
let hide = false;
gId("filters").querySelectorAll("input[type=checkbox]").forEach((e) => { if (e.checked && !listItemName.includes(e.dataset.flt)) hide = i>0 /*true*/; });
listItem.style.display = hide ? 'none' : '';
listItem.style.display = hide && !listItem.classList.contains("selected") ? 'none' : '';
});
}

Expand Down

0 comments on commit 8c5e0cd

Please sign in to comment.