chore: reduce debounce time
parent
08de0ad10c
commit
f0967b7072
|
@ -146,7 +146,7 @@ const debounce = (callback, wait) => {
|
|||
DeclarationDataCenter.init()
|
||||
.then((dataCenter) => {
|
||||
// Search autocompletion.
|
||||
SEARCH_INPUT.addEventListener("input", debounce(ev => handleSearch(dataCenter, null, ev, ac_results, AC_MAX_RESULTS, true), 500));
|
||||
SEARCH_INPUT.addEventListener("input", debounce(ev => handleSearch(dataCenter, null, ev, ac_results, AC_MAX_RESULTS, true), 300));
|
||||
if(SEARCH_PAGE_INPUT) {
|
||||
SEARCH_PAGE_INPUT.addEventListener("input", ev => handleSearch(dataCenter, null, ev, SEARCH_RESULTS, SEARCH_PAGE_MAX_RESULTS, false))
|
||||
document.querySelectorAll(".kind_checkbox").forEach((checkbox) =>
|
||||
|
@ -157,7 +157,7 @@ DeclarationDataCenter.init()
|
|||
SEARCH_INPUT.dispatchEvent(new Event("input"))
|
||||
})
|
||||
.catch(e => {
|
||||
SEARCH_INPUT.addEventListener("input", debounce(ev => handleSearch(null, e, ev, ac_results, AC_MAX_RESULTS, true), 500));
|
||||
SEARCH_INPUT.addEventListener("input", debounce(ev => handleSearch(null, e, ev, ac_results, AC_MAX_RESULTS, true), 300));
|
||||
if(SEARCH_PAGE_INPUT) {
|
||||
SEARCH_PAGE_INPUT.addEventListener("input", ev => handleSearch(null, e, ev, SEARCH_RESULTS, SEARCH_PAGE_MAX_RESULTS, false));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue