react-data-table-component-extensions
react-data-table-component-extensions copied to clipboard
The extension doesn't work when the DataTable is set to paginationServer and the data property between DataTableExtensions and DataTable differ
Hi, Thanks for the nice extension.
I came to realize the extension fails to work when the pagination is from the server and the data property is length differ.
Scenario- Considering the pagination is from the server and the total number of data that we want to export is 800 while the total number of data that we want to display per page is 10.
This is my setup const dataAll and const data are different in size and pagination is from the server.
const tableData = {
columns,
data: dataAll,
filterHidden: false,
filter: false,
exportHeaders : true,
print: false
};
return (
<DataTableExtensions {...tableData}>
<DataTable
title="Customers"
columns={columns}
data={data}
progressPending={loading}
pagination
paginationServer
paginationTotalRows={totalRows}
paginationDefaultPage={currentPage}
onChangeRowsPerPage={handlePerRowsChange}
onChangePage={handlePageChange}
selectableRows
onSelectedRowsChange={handleChangeRowsSelected}
contextActions={contextActions(sendEmailToSelectedContacts)}
sortIcon={sortIcon}
selectableRowsComponent={Checkbox}
defaultSortField="FirstName"
/>
</DataTableExtensions>
);
Am I missing something?
Thanks