diff --git a/backend/templates/songs/index.html b/backend/templates/songs/index.html
index db88730..461f6cc 100644
--- a/backend/templates/songs/index.html
+++ b/backend/templates/songs/index.html
@@ -122,17 +122,6 @@
<%:author%>
import {Options, BooleanOption} from "{% static 'js/Options.js' %}"
const canWakeLock = () => 'wakeLock' in navigator;
- function debounce(callback, delay = 1000) {
- var time;
-
- return (...args) => {
- clearTimeout(time);
- time = setTimeout(() => {
- callback(...args);
- }, delay);
- };
- }
-
let table = null
function createDatatable(paging, initialSearch) {
const options = {
@@ -259,13 +248,6 @@ <%:author%>
$(".chord").show()
}
}
- const search = debounce(
- function ( val ) {
- table.search(val);
- table.draw(false);
- console.log("searched")
- }, 200
- );
const config = new Map([
["hide_chords", new BooleanOption(document.getElementById("hideChords"), hideChords, false)],
@@ -322,7 +304,8 @@ <%:author%>
});
document.getElementById("searchInput").addEventListener("input", function(event) {
- search(event.target.value)
+ table.search(event.target.value);
+ table.draw(false);
})
{% endblock %}
\ No newline at end of file