Merge pull request #4188 from ChristopheVandePoel/fix-pagination-limit

Fix unlimited pagination
This commit is contained in:
Bill Thornton 2022-11-30 14:38:39 -05:00 committed by GitHub
commit 568d98029c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ const Pagination: FC<PaginationProps> = ({ viewQuerySettings, setViewQuerySettin
const totalRecordCount = itemsResult.TotalRecordCount || 0; const totalRecordCount = itemsResult.TotalRecordCount || 0;
const startIndex = viewQuerySettings.StartIndex || 0; const startIndex = viewQuerySettings.StartIndex || 0;
const recordsEnd = Math.min(startIndex + limit, totalRecordCount); const recordsEnd = Math.min(startIndex + limit, totalRecordCount);
const showControls = limit < totalRecordCount; const showControls = limit > 0 && limit < totalRecordCount;
const element = useRef<HTMLDivElement>(null); const element = useRef<HTMLDivElement>(null);
const onNextPageClick = useCallback(() => { const onNextPageClick = useCallback(() => {

View file

@ -274,7 +274,7 @@ const ViewItemsContainer: FC<ViewItemsContainerProps> = ({
Fields: fields, Fields: fields,
ImageTypeLimit: 1, ImageTypeLimit: 1,
EnableImageTypes: 'Primary,Backdrop,Banner,Thumb,Disc,Logo', EnableImageTypes: 'Primary,Backdrop,Banner,Thumb,Disc,Logo',
Limit: userSettings.libraryPageSize(undefined), Limit: userSettings.libraryPageSize(undefined) || undefined,
IsFavorite: getBasekey() === 'favorites' ? true : null, IsFavorite: getBasekey() === 'favorites' ? true : null,
VideoTypes: viewQuerySettings.VideoTypes, VideoTypes: viewQuerySettings.VideoTypes,
GenreIds: viewQuerySettings.GenreIds, GenreIds: viewQuerySettings.GenreIds,