Skip to content

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

web: reuse search query

Abdullah Atta3e7db7051bda
diff --git a/apps/web/src/components/route-container/index.tsx b/apps/web/src/components/route-container/index.tsx
index b1ef2f9fc..561a98a73 100644
--- a/apps/web/src/components/route-container/index.tsx
+++ b/apps/web/src/components/route-container/index.tsx
@@ -67,6 +67,7 @@ function Header(props: RouteContainerProps) {
const toggleSideMenu = useStore((store) => store.toggleSideMenu);
const isMobile = useMobile();
const isSearching = useSearchStore((store) => store.isSearching);
+ const query = useSearchStore((store) => store.query);
if (isSearching)
return (
@@ -81,6 +82,7 @@ function Header(props: RouteContainerProps) {
type="text"
sx={{ m: 0, flex: 1 }}
styles={{ input: { p: "7px" } }}
+ defaultValue={query}
placeholder="Type your query here"
onChange={debounce(
(e) => useSearchStore.setState({ query: e.target.value }),