mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Debounce WI search
This commit is contained in:
@ -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', () => {
|
||||||
|
Reference in New Issue
Block a user