diff --git a/src/components/SearchBar.jsx b/src/components/SearchBar.jsx index d675be0..6657ce1 100644 --- a/src/components/SearchBar.jsx +++ b/src/components/SearchBar.jsx @@ -4,7 +4,7 @@ export function SearchBar({ data, setDisplayData, setSearch, search }) { setSearch(searchTerm); const filteredUsers = data.filter((item) => - item.name.toLowerCase().includes(searchTerm.toLowerCase()), + item.name.toLowerCase().includes(searchTerm.trim().toLowerCase()), ); setDisplayData(filteredUsers); };