mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Fixed pagination of pads (#6406)
This commit is contained in:
parent
27dab95113
commit
df3686dcad
1 changed files with 3 additions and 2 deletions
|
@ -167,10 +167,11 @@ export const PadPage = ()=>{
|
|||
}}><ChevronLeft/><span>Previous Page</span></button>
|
||||
<span>{currentPage+1} out of {pages}</span>
|
||||
<button disabled={pages == currentPage+1} onClick={()=>{
|
||||
setCurrentPage(currentPage+1)
|
||||
const newCurrentPage = currentPage+1
|
||||
setCurrentPage(newCurrentPage)
|
||||
setSearchParams({
|
||||
...searchParams,
|
||||
offset: (Number(currentPage)-1)*searchParams.limit
|
||||
offset: (Number(newCurrentPage))*searchParams.limit
|
||||
})
|
||||
}}><span>Next Page</span><ChevronRight/></button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue