Skip to content

Pagination not work #100

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

Open
darannu86 opened this issue Jun 29, 2020 · 1 comment
Open

Pagination not work #100

darannu86 opened this issue Jun 29, 2020 · 1 comment

Comments

@darannu86
Copy link

I put my data in:

  <DynamicDataTable  rows={this.state.fullData} fieldsToExclude={['LEMMA' , 'RESPID', 'ORIGININAL' , 'TEXT_CLEAN', 'LEMMA_ORIGINAL', 'TAG', 'userName', 'TEXT', 'thumbsUpCount', 'reviewCreatedVersion' , 'Language',
   'replyContent', 'repliedAt' ]}
   currentPage={1}
    totalPages={1000}
    paginationDelta={6}
    />

but it show all rows in one page

@JacobBrassington
Copy link
Contributor

@darannu86 https://github.com/langleyfoxall/react-dynamic-data-table#pagination.
It says here that you also need to add a changePage prop to make this work, which will change what is passed into the rows props. Currently you are passing the fullData set into row, however this should be all rows that should currently being show. This is because you need to handle the data change on change of page yourself. If you want this to be done automatically perhaps look at the AjaxDynamicDataTable. This will handle it for you however the API package to go with this is only for Laravel.

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

2 participants