mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 14:27:18 +00:00
Keep selected FX while searching
This commit is contained in:
parent
271a07a7d6
commit
8c5e0cd4e9
@ -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;
|
||||
});
|
||||
|
||||
@ -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' : '';
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user