diff --git a/src/App.tsx b/src/App.tsx index f565258..2b8602a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -52,7 +52,12 @@ export const App = () => { }, [state]); useEffect(() => { - setSearchWords(state.search.split(' ').filter(e => e)); + setSearchWords( + state.search + .toLowerCase() + .split(' ') + .filter(e => e) + ); }, [state.search]); //set html attributes diff --git a/src/helpers/filter.ts b/src/helpers/filter.ts index 4fcef54..59ffbe5 100644 --- a/src/helpers/filter.ts +++ b/src/helpers/filter.ts @@ -75,7 +75,10 @@ export function filter( //search? if (search) { - const searchWords = search.split(' ').filter(e => e); + const searchWords = search + .toLowerCase() + .split(' ') + .filter(e => e); meetings = meetings.filter( meeting => searchWords.map(word => meeting.search.includes(word)).filter(e => e)