1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 22:51:59 +00:00

fix(web): Add debouncing to the search popup form (#13684)

This will fix the bug where when we click on the second date picker just after selecting date in first date picker it closes the search popup form
This commit is contained in:
Pranay Pandey 2024-10-23 18:21:17 +05:30 committed by GitHub
parent 1ec9a60e41
commit 7e9fb5df5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,13 +66,17 @@
};
const onFocusOut = () => {
if ($isSearchEnabled) {
$preventRaceConditionSearchBar = true;
}
const focusOutTimer = setTimeout(() => {
if ($isSearchEnabled) {
$preventRaceConditionSearchBar = true;
}
closeDropdown();
$isSearchEnabled = false;
showFilter = false;
closeDropdown();
$isSearchEnabled = false;
showFilter = false;
}, 100);
clearTimeout(focusOutTimer);
};
const onHistoryTermClick = async (searchTerm: string) => {