Debounce WI search

This commit is contained in:
Wolfsblvt 2024-04-28 05:42:15 +02:00
parent e08a21ebe7
commit 6d04e93f34
1 changed files with 5 additions and 2 deletions

View File

@ -3038,9 +3038,12 @@ jQuery(() => {
}
});
const debouncedWISearch = debounce((searchQuery) => {
worldInfoFilter.setFilterData(FILTER_TYPES.WORLD_INFO_SEARCH, searchQuery);
}, 300);
$('#world_info_search').on('input', function () {
const term = $(this).val();
worldInfoFilter.setFilterData(FILTER_TYPES.WORLD_INFO_SEARCH, term);
const searchQuery = $(this).val();
debouncedWISearch(searchQuery);
});
$('#world_refresh').on('click', () => {