Add search bar to popup for filtering containers

This commit is contained in:
sal
2026-03-04 21:30:03 -06:00
parent d6dabb2646
commit 23759e34a4
3 changed files with 17 additions and 0 deletions

View File

@@ -85,4 +85,13 @@ document.getElementById("reset").addEventListener("click", async (e) => {
}, 1200);
});
document.getElementById("search").addEventListener("input", (e) => {
const q = e.target.value.toLowerCase();
const rows = document.querySelectorAll("#container-list .row");
for (const row of rows) {
const text = row.textContent.toLowerCase();
row.classList.toggle("hidden", q && !text.includes(q));
}
});
loadContainers();