From ebf4511183047ebb94a9af7f827b2bb7d180ed5a Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 21 Feb 2025 21:56:56 -0500 Subject: [PATCH] enable pagination when over 90 Signed-off-by: Deluan --- ui/src/artist/ArtistShow.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/artist/ArtistShow.jsx b/ui/src/artist/ArtistShow.jsx index 357a8df81..2f3ff4299 100644 --- a/ui/src/artist/ArtistShow.jsx +++ b/ui/src/artist/ArtistShow.jsx @@ -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 = }