Skip to content

Commit

Permalink
feat: search for multiple words (#4362)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoccoSmit authored Feb 4, 2025
1 parent 6c088e0 commit 03267d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ const SearchBar = () => {
if (e.key === "Enter") {
e.preventDefault();
if (queryText !== "") {
memoFilterStore.removeFilter((f) => f.factor === "contentSearch");
memoFilterStore.addFilter({
factor: "contentSearch",
value: queryText,
const words = queryText.split(" ");
words.forEach((word) => {
memoFilterStore.addFilter({
factor: "contentSearch",
value: word,
});
});
setQueryText("");
}
Expand Down

0 comments on commit 03267d6

Please sign in to comment.