-
Hello. I've been having issues with the Pagination module. The initial state is set from url and it does work for changing pages but it is not showen. useEffect(() => {
const newParams = new URLSearchParams(searchParams.toString())
const pageParm = newParams.get('page') || '1'
setPage(Number.parseInt(pageParm))
}, [setPage])
function ChangePage(newPage: number) {
if(newPage == page) return
const newParams = new URLSearchParams(searchParams.toString())
newParams.set('page', newPage.toString())
window.location.href = '?' + newParams
} <Pagination
loop
showControls
showShadow
total={max}
initialPage={page}
page={page}
onChange={ChangePage}
/> Is there something i'm doing wrong? |
Beta Was this translation helpful? Give feedback.
Answered by
KopyTKG
Nov 21, 2023
Replies: 1 comment 2 replies
-
Welp found the issue |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
KopyTKG
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Welp found the issue