Unverified Commit 03267d6d authored by RoccoSmit's avatar RoccoSmit Committed by GitHub

feat: search for multiple words (#4362)

parent 6c088e09
...@@ -17,10 +17,12 @@ const SearchBar = () => { ...@@ -17,10 +17,12 @@ const SearchBar = () => {
if (e.key === "Enter") { if (e.key === "Enter") {
e.preventDefault(); e.preventDefault();
if (queryText !== "") { if (queryText !== "") {
memoFilterStore.removeFilter((f) => f.factor === "contentSearch"); const words = queryText.split(" ");
memoFilterStore.addFilter({ words.forEach((word) => {
factor: "contentSearch", memoFilterStore.addFilter({
value: queryText, factor: "contentSearch",
value: word,
});
}); });
setQueryText(""); setQueryText("");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment