From 2ff2d6c1fc68355b3aea8dbe802770a8af9c4664 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 15 Aug 2022 14:26:18 -0500 Subject: [PATCH] Scroll to top for fresh query --- web/components/contract-search.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index 54b30f3f..11d65a13 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -139,6 +139,7 @@ export function ContractSearch(props: { setNumPages(results.nbPages) if (freshQuery) { setPages([newPage]) + window.scrollTo(0, 0) } else { setPages((pages) => [...pages, newPage]) }