From dcd0449ef78b35962dba4b98d5241fe6a781aae5 Mon Sep 17 00:00:00 2001 From: Ty Bolt Date: Tue, 3 Dec 2024 11:12:20 -0500 Subject: [PATCH] fix(search): update dashboard search to allow whitespace (#875) --- react-app/src/components/SearchForm/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/react-app/src/components/SearchForm/index.tsx b/react-app/src/components/SearchForm/index.tsx index 24c8a98aa7..857a19ff55 100644 --- a/react-app/src/components/SearchForm/index.tsx +++ b/react-app/src/components/SearchForm/index.tsx @@ -1,7 +1,7 @@ -import { FC, useEffect, useState } from "react"; import { useDebounce } from "@/hooks"; -import { XIcon, Loader } from "lucide-react"; import { motion } from "framer-motion"; +import { Loader, XIcon } from "lucide-react"; +import { FC, useEffect, useState } from "react"; export const SearchForm: FC<{ handleSearch: (s: string) => void; @@ -21,9 +21,8 @@ export const SearchForm: FC<{ }; const handleInputChange = (event: React.ChangeEvent) => { - const updateText = event.target.value.trim(); + const updateText = event.target.value; setSearchText(updateText); - if (!updateText) handleSearch(""); }; return (