mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: reuse search query
This commit is contained in:
committed by
Abdullah Atta
parent
4b83e7319b
commit
130f39ef8a
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user