Scroll to top for fresh query

This commit is contained in:
James Grugett 2022-08-15 14:26:18 -05:00
parent 5c49461449
commit 2ff2d6c1fc

View File

@ -139,6 +139,7 @@ export function ContractSearch(props: {
setNumPages(results.nbPages)
if (freshQuery) {
setPages([newPage])
window.scrollTo(0, 0)
} else {
setPages((pages) => [...pages, newPage])
}