mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: search for multiple words (#4362)
This commit is contained in:
@@ -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("");
|
||||
}
|
||||
|
Reference in New Issue
Block a user