debounce 300ms

This commit is contained in:
2026-07-03 10:01:15 -07:00
parent c4a85c49d0
commit 9ea3753069

View File

@@ -482,7 +482,10 @@ function highlight(el, str) {{
}});
}}
let _qt;
q.addEventListener('input', ()=>{{
clearTimeout(_qt);
_qt = setTimeout(()=>{{
let v = q.value.toLowerCase();
let rows = b.children;
let vis = 0;
@@ -500,6 +503,7 @@ q.addEventListener('input', ()=>{{
}}
cnt.textContent = vis + ' / ' + rows.length;
vc.textContent = vis;
}}, 300);
}});
</script>
</body></html>