3

I am using ReactTable component from react-table to display paginated data returned from my backend.

the backend returns an object as follows:

{count: (total items count), results: [items], pages_count:(number of pages), page:(current page) }

I want to set the total page count in ReactTable as the total page count returned by the backend and not as the length of the array of data. (rows returned by the backend corresponds only to the actual page). I tried to override the getPaginationProps prop, but I really did not find out how to do it correctly since I am new to react. Am I on the correct path ? and how can I do it ? Thank you

2

1 Answer 1

0

Please refer this blog for server side pagination related stuff with respect to react-table :

https://malithjayaweera.com/2018/01/reactjs-server-side-pagination/

Sign up to request clarification or add additional context in comments.

1 Comment

Post answers should be properly formed answers, rather than links to external sources. Ideally, links should only be included for reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.