[Bugfix] show or hide pagination footer only if client or server side pagination is enabled (#4430)

* show or hide pagination footer only if client or server side pagination is enabled

* Display pagination only if serverside or client side pagination is turned on

Co-authored-by: Sherfin Shamsudeen <sherfin94@gmail.com>
This commit is contained in:
Arpit 2022-10-14 13:50:23 +05:30 committed by GitHub
parent b36461b161
commit 2a8d77fc8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -805,27 +805,25 @@ export function Table({
</div>
)}
</div>
{(clientSidePagination ||
serverSidePagination ||
Object.keys(tableDetails.changeSet || {}).length > 0 ||
showFilterButton ||
showDownloadButton) && (
{(clientSidePagination || serverSidePagination || Object.keys(tableDetails.changeSet || {}).length > 0) && (
<div className="card-footer d-flex align-items-center jet-table-footer justify-content-center">
<div className="table-footer row gx-0">
<div className="col">
<Pagination
lastActivePageIndex={pageIndex}
serverSide={serverSidePagination}
autoGotoPage={gotoPage}
autoCanNextPage={canNextPage}
autoPageCount={pageCount}
autoPageOptions={pageOptions}
onPageIndexChanged={onPageIndexChanged}
pageIndex={paginationInternalPageIndex}
setPageIndex={setPaginationInternalPageIndex}
enableNextButton={enableNextButton}
enablePrevButton={enablePrevButton}
/>
{(clientSidePagination || serverSidePagination) && (
<Pagination
lastActivePageIndex={pageIndex}
serverSide={serverSidePagination}
autoGotoPage={gotoPage}
autoCanNextPage={canNextPage}
autoPageCount={pageCount}
autoPageOptions={pageOptions}
onPageIndexChanged={onPageIndexChanged}
pageIndex={paginationInternalPageIndex}
setPageIndex={setPaginationInternalPageIndex}
enableNextButton={enableNextButton}
enablePrevButton={enablePrevButton}
/>
)}
</div>
<div className="col d-flex justify-content-end">
{showBulkUpdateActions && Object.keys(tableDetails.changeSet || {}).length > 0 ? (