Skip to content

Commit

Permalink
refactor: add mouse event type
Browse files Browse the repository at this point in the history
  • Loading branch information
ajyey committed Jul 12, 2023
1 parent 6818181 commit 43cd43b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pages/options/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ function FilterEmailsDropdown({
// Reference to the dropdown container div, used to detect clicks outside the dropdown
const dropdownRef = useRef<HTMLDivElement | null>(null);
// Close the dropdown menu when the user clicks outside of it
const handleClickOutside = (event: any) => {
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
const handleClickOutside = (event: MouseEvent) => {
if (
dropdownRef.current &&
!dropdownRef.current.contains(event.target as Node)
) {
setIsOpen(false);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/popup/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down

0 comments on commit 43cd43b

Please sign in to comment.