Skip to content

Commit

Permalink
Merge pull request #8594 from ohcnetwork/rithviknishad/fix/missing-pa…
Browse files Browse the repository at this point in the history
…gination-in-file-upload

Fixes file upload missing pagination component (staging patch)
  • Loading branch information
khavinshankar authored Sep 23, 2024
2 parents 6009869 + 1843705 commit 00a67ee
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 00a67ee

Please sign in to comment.