diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-19 02:41:17 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-19 02:41:17 +0000 |
| commit | 3304ed4733f7301a29231ee4f967e04fd7c10880 (patch) | |
| tree | 711d7157378eb7d155057bd6711a102c6aa0f365 /apps/web/components/dashboard/search/SearchInput.tsx | |
| parent | aa7d68a00cbe9d7d3733f4cd02061d4586af061c (diff) | |
| download | karakeep-3304ed4733f7301a29231ee4f967e04fd7c10880.tar.zst | |
fix: Remove flicker from search bar
Diffstat (limited to 'apps/web/components/dashboard/search/SearchInput.tsx')
| -rw-r--r-- | apps/web/components/dashboard/search/SearchInput.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/web/components/dashboard/search/SearchInput.tsx b/apps/web/components/dashboard/search/SearchInput.tsx index 1ca6a0ae..0dd86c50 100644 --- a/apps/web/components/dashboard/search/SearchInput.tsx +++ b/apps/web/components/dashboard/search/SearchInput.tsx @@ -3,12 +3,11 @@ import React from "react"; import { Input } from "@/components/ui/input"; import { useDoBookmarkSearch } from "@/lib/hooks/bookmark-search"; -import { cn } from "@/lib/utils"; const SearchInput = React.forwardRef< HTMLInputElement, React.HTMLAttributes<HTMLInputElement> & { loading?: boolean } ->(({ className, loading = false, ...props }, ref) => { +>(({ className, ...props }, ref) => { const { debounceSearch, searchQuery } = useDoBookmarkSearch(); return ( @@ -17,7 +16,7 @@ const SearchInput = React.forwardRef< placeholder="Search" defaultValue={searchQuery} onChange={(e) => debounceSearch(e.target.value)} - className={cn(loading ? "animate-pulse-border" : undefined, className)} + className={className} {...props} /> ); |
