Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix search result note item not updating (#7878)

01zulfif5ad31f0a3db
diff --git a/apps/web/src/views/all-notes.tsx b/apps/web/src/views/all-notes.tsx
index 56ecacd41..fca459f3f 100644
--- a/apps/web/src/views/all-notes.tsx
+++ b/apps/web/src/views/all-notes.tsx
@@ -32,10 +32,14 @@ function Home() {
const isCompact = useStore((store) => store.viewMode === "compact");
const refresh = useStore((store) => store.refresh);
const setContext = useStore((store) => store.setContext);
- const filteredItems = useSearch("notes", (query) => {
- if (useStore.getState().context) return;
- return db.lookup.notes(query).sorted();
- });
+ const filteredItems = useSearch(
+ "notes",
+ (query) => {
+ if (useStore.getState().context) return;
+ return db.lookup.notes(query).sorted();
+ },
+ [notes]
+ );
useNavigate("home", setContext);