This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
|
import { useEffect } from 'react'
|
||||||
import { Helmet } from 'react-helmet-async'
|
import { Helmet } from 'react-helmet-async'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
|
|
||||||
@@ -31,6 +32,10 @@ export default (() => {
|
|||||||
const changes = data?.changes ?? []
|
const changes = data?.changes ?? []
|
||||||
const totalPages = data ? Math.ceil (data.count / limit) : 0
|
const totalPages = data ? Math.ceil (data.count / limit) : 0
|
||||||
|
|
||||||
|
useEffect (() => {
|
||||||
|
document.querySelector ('table')?.scrollIntoView ({ behavior: 'smooth' })
|
||||||
|
}, [location.search])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MainArea>
|
<MainArea>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default (() => {
|
|||||||
setUpdatedFrom (qUpdatedFrom)
|
setUpdatedFrom (qUpdatedFrom)
|
||||||
setUpdatedTo (qUpdatedTo)
|
setUpdatedTo (qUpdatedTo)
|
||||||
|
|
||||||
document.getElementsByTagName ('main')![0].scroll (0, 0)
|
document.querySelector ('table')?.scrollIntoView ({ behavior: 'smooth' })
|
||||||
}, [location.search])
|
}, [location.search])
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user