debounce 300ms
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user