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