mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 11:39:21 +02:00
web: fix search result note item not updating (#7878)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user