Add 200ms timeout before filtering while you type your query.
This commit is contained in:
parent
7b197c867b
commit
25a611e39e
1 changed files with 6 additions and 1 deletions
|
@ -327,9 +327,14 @@ function refresh_channel_callback(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
var search_filter_box = document.getElementById("search_filter");
|
var search_filter_box = document.getElementById("search_filter");
|
||||||
|
var search_filter_wait_for_typing;
|
||||||
var search_filter_hook = function(event)
|
var search_filter_hook = function(event)
|
||||||
|
{
|
||||||
|
clearTimeout(search_filter_wait_for_typing);
|
||||||
|
search_filter_wait_for_typing = setTimeout(function()
|
||||||
{
|
{
|
||||||
filter_video_cards(search_filter_box.value);
|
filter_video_cards(search_filter_box.value);
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
search_filter_box.addEventListener("keyup", search_filter_hook);
|
search_filter_box.addEventListener("keyup", search_filter_hook);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue