-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
When searching in the tasks and notes pages, the URL changes correctly and the content updates to show the correct data. However it reverts back to a no-search state after a couple of seconds.
`const [query, setQuery] = useState("");
const router = useRouter();
const searchParams = useSearchParams();
useEffect(() => {
const delayDebounceFn = setTimeout(() => {
let newUrl = "";
if (query) {
newUrl = formUrlQuery({
params: searchParams.toString(),
key: "query",
value: query,
});
} else {
newUrl = removeKeysFromQuery({
params: searchParams.toString(),
keysToRemove: ["query"],
});
}
router.push(newUrl, { scroll: false });
}, 300);
return () => clearTimeout(delayDebounceFn);
}, [query, searchParams, router]);`
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed