Skip to content

Commit

Permalink
Fixes file upload missing pagination component (#8597)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 23, 2024
1 parent 15ea986 commit 09fa1f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/Files/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,12 @@ export const FileUpload = (props: FileUploadProps) => {
</div>
)}
</div>
{(fileQuery?.data?.results || []).length > RESULTS_PER_PAGE_LIMIT && (
{(fileQuery?.data?.count ?? 0) > RESULTS_PER_PAGE_LIMIT && (
<div className="mt-4 flex w-full justify-center">
<Pagination
cPage={currentPage}
defaultPerPage={RESULTS_PER_PAGE_LIMIT}
data={{ totalCount: (fileQuery?.data?.results || []).length }}
data={{ totalCount: fileQuery?.data?.count ?? 0 }}
onChange={handlePagination}
/>
</div>
Expand Down

0 comments on commit 09fa1f0

Please sign in to comment.