Closed ali-master closed 5 years ago
Did not have an answer to my question?
Hi Ali, have you read this page of the documentation about server-side pagination & sorting: https://react-table.js.org/#/story/server-side-data The ReactTable component needs a manual property for example. Let me know if you have any trouble with the implementation.
Yes, @Jaujon,
But sorting features should be managing by the client not the server and just I need manage the table content by changing pagination then call API and put that in the table.
Thank you in advance.
@ali-master
ReacTable provides everything necessary to handle server-side pagination & sorting. If your api provides the necessary pagination interface, you are perfectly able to implement it.
I know @Jaujon,
But as I said in my issue description, the second page does not render my contents, but when I use the manual props, the sort function doesn't work.
manual // Forces table not to paginate or sort automatically, so we can handle it server-side;
Putting a prop manual in the
If you use server-side data and the manual
prop, your server is responsible for handling all of the pagination, sorting, and filtering on your table. Trying to combine server-side data with client side filtering etc. is very messy and probably a bad idea.
This feature/issue has been tagged as one that will likely be fixed or improved in the next major release of React-Table. This release is expected to be completed in the next 6 - 8 months. Please see #1143 for more detail. If you believe this feature can be easily fixed, we invite you to fork the project, attempt the fix, and use it until the latest version is available. If the fix is simple enough, we will also consider it as a PR to the current version.
Is this a general question about implementation, support, API, or anything else?
I want to change the table content after changing the pagination, and sort functionalities should be works as well by client not server. And I have been written the following code for doing this:
But while I click on Next button, I could receive data, but I couldn't see my data in the table, But it just works as ok on the first page. I if use the onFetchData hook, it will be working as ok, but the sort feature is not working after using this hook.
What version of React-Table are you using?
6.8.5 Your bug may already be fixed in the latest release. Run
yarn upgrade react-table
! 6.8.5What bug are you experiencing, or what feature are you proposing?
I can not see my data in the table after changing the pagination by that hooks(My data has from server and client just should handle the sort feature.).
What are the steps to reproduce the issue?
Try to get data from the server with this params 1.1: page = 1 1.2: pageSize = 25 I will receive the number of total pages and data.
I try to render the table with the above config.
I have used the pagination hooks for handling the data by pagination from the server.
If I go to page 2, then I can not see the rendered data in the table and table is empty. But it works on the first page.