diff options
Diffstat (limited to 'apps/web/components/dashboard')
| -rw-r--r-- | apps/web/components/dashboard/bookmarks/EditorCard.tsx | 4 | ||||
| -rw-r--r-- | apps/web/components/dashboard/search/SearchInput.tsx | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/web/components/dashboard/bookmarks/EditorCard.tsx b/apps/web/components/dashboard/bookmarks/EditorCard.tsx index a5966845..7ac1cade 100644 --- a/apps/web/components/dashboard/bookmarks/EditorCard.tsx +++ b/apps/web/components/dashboard/bookmarks/EditorCard.tsx @@ -24,7 +24,9 @@ import { BookmarkTypes } from "@karakeep/shared/types/bookmarks"; import { useUploadAsset } from "../UploadDropzone"; -function useFocusOnKeyPress(inputRef: React.RefObject<HTMLTextAreaElement>) { +function useFocusOnKeyPress( + inputRef: React.RefObject<HTMLTextAreaElement | null>, +) { useEffect(() => { function handleKeyPress(e: KeyboardEvent) { if (!inputRef.current) { diff --git a/apps/web/components/dashboard/search/SearchInput.tsx b/apps/web/components/dashboard/search/SearchInput.tsx index 0de7694a..dad995e1 100644 --- a/apps/web/components/dashboard/search/SearchInput.tsx +++ b/apps/web/components/dashboard/search/SearchInput.tsx @@ -35,7 +35,7 @@ import QueryExplainerTooltip from "./QueryExplainerTooltip"; const MAX_DISPLAY_SUGGESTIONS = 5; function useFocusSearchOnKeyPress( - inputRef: React.RefObject<HTMLInputElement>, + inputRef: React.RefObject<HTMLInputElement | null>, value: string, setValue: (value: string) => void, setPopoverOpen: React.Dispatch<React.SetStateAction<boolean>>, |
