mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-20 22:07:43 +03:00
enable pagination when over 90
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
4a69507e3e
commit
ebf4511183
@ -56,7 +56,7 @@ const AlbumShowLayout = (props) => {
|
||||
const { width } = props
|
||||
const [, perPageOptions] = useAlbumsPerPage(width)
|
||||
|
||||
const maxPerPage = 36
|
||||
const maxPerPage = 90
|
||||
let perPage = 0
|
||||
let pagination = null
|
||||
|
||||
@ -67,7 +67,9 @@ const AlbumShowLayout = (props) => {
|
||||
|
||||
if (count > maxPerPage) {
|
||||
perPage = Math.trunc(maxPerPage / perPageOptions[0]) * perPageOptions[0]
|
||||
const rowsPerPageOptions = [1, 2, 3].map((option) => option * perPage)
|
||||
const rowsPerPageOptions = [1, 2, 3].map((option) =>
|
||||
Math.trunc(option * (perPage / 3)),
|
||||
)
|
||||
pagination = <Pagination rowsPerPageOptions={rowsPerPageOptions} />
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user