mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-03 03:17:54 +01:00
Debounce WI search
This commit is contained in:
parent
e08a21ebe7
commit
6d04e93f34
@ -3038,9 +3038,12 @@ jQuery(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const debouncedWISearch = debounce((searchQuery) => {
|
||||||
|
worldInfoFilter.setFilterData(FILTER_TYPES.WORLD_INFO_SEARCH, searchQuery);
|
||||||
|
}, 300);
|
||||||
$('#world_info_search').on('input', function () {
|
$('#world_info_search').on('input', function () {
|
||||||
const term = $(this).val();
|
const searchQuery = $(this).val();
|
||||||
worldInfoFilter.setFilterData(FILTER_TYPES.WORLD_INFO_SEARCH, term);
|
debouncedWISearch(searchQuery);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#world_refresh').on('click', () => {
|
$('#world_refresh').on('click', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user