Scroll to top for fresh query
This commit is contained in:
parent
5c49461449
commit
2ff2d6c1fc
|
@ -139,6 +139,7 @@ export function ContractSearch(props: {
|
||||||
setNumPages(results.nbPages)
|
setNumPages(results.nbPages)
|
||||||
if (freshQuery) {
|
if (freshQuery) {
|
||||||
setPages([newPage])
|
setPages([newPage])
|
||||||
|
window.scrollTo(0, 0)
|
||||||
} else {
|
} else {
|
||||||
setPages((pages) => [...pages, newPage])
|
setPages((pages) => [...pages, newPage])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user