Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The extension doesn't work when the DataTable is set to paginationServer and the data property between DataTableExtensions and DataTable differ #20

Open
mangowi opened this issue Apr 20, 2021 · 0 comments

Comments

@mangowi
Copy link

mangowi commented Apr 20, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant