Access 'debounce' after initialization

This commit is contained in:
Ingrid Budau 2023-07-16 09:51:05 +02:00
parent 89b8d54f26
commit be0018d1a0
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,6 @@ var cset = function(option, value) {
xhr.send();
}
const search = debounce(() => searchOption())
// Create a delay while the user types
const debounce = (func, timeout=200) => {
let timer;
@ -22,6 +20,8 @@ const debounce = (func, timeout=200) => {
}
}
const search = debounce(() => searchOption())
/* First sort the options' names back into alphabetical order. Make them invisible.
Filter first by name, then by short description and finally by long description.
Display them in this order.*/