Skip to content

Commit

Permalink
fix(web): Add debouncing to the search popup form (#13684)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Pranay-Pandey authored Oct 23, 2024
1 parent 1ec9a60 commit 7e9fb5d
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 7e9fb5d

Please sign in to comment.