Skip to content

Commit

Permalink
update dashboard search to allow whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tbolt committed Nov 25, 2024
1 parent 0c7676a commit 07b4cc9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions react-app/src/components/SearchForm/index.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -21,9 +21,8 @@ export const SearchForm: FC<{
};

const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const updateText = event.target.value.trim();
const updateText = event.target.value;
setSearchText(updateText);
if (!updateText) handleSearch("");
};

return (
Expand Down

0 comments on commit 07b4cc9

Please sign in to comment.