feat: search for multiple words (#4362)

pull/4370/head
RoccoSmit 6 months ago committed by GitHub
parent 6c088e09d9
commit 03267d6d37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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("");
} }

Loading…
Cancel
Save