Skip to content

Commit

Permalink
fix(search): update dashboard search to allow whitespace (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbolt authored Dec 3, 2024
1 parent 666cc2f commit dcd0449
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 dcd0449

Please sign in to comment.