Skip to content

Commit

Permalink
fix: Trims white space from ends of search input.
Browse files Browse the repository at this point in the history
Removes leading and trailing white space from search input that has been
pasted in.
  • Loading branch information
neomorphic committed Sep 12, 2024
1 parent fe548d3 commit c01955e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/SearchInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default function SearchInput({ searchTerm, examples, uploads, help }) {
}, [searchTerm, setSearch]);

const handleSearch = value => {
history.push(`/search?q=${value}`);

history.push(`/search?q=${value.trim()}`);
};

useEffect(() => {
Expand Down

0 comments on commit c01955e

Please sign in to comment.