Atlaskit Dynamic Table: can't set total pages

I just start using this component and can’t find any way to set total pages for its pagination.
I think it’s unusual.
With a lot of data, we can’t load all at the same time. We often load the first ten rows, then the next ten rows if we click on the “Next” button (or the 2nd page)… and so on.
What should I do? I think I have to hide the pagination of the table by setting rowsPerPage = undefined, and use @atlaskit/pagination

1 Like

Welcome @NguyenHoang,

I think it’s a little tricky to manage server-side pagination with the @atlaskit/dynamic-table component only. It doesn’t provide a property like the one available on @atlaskit/pagination to display how many pages are needed. The total number of pages on @atlaskit/dynamic-table is being defined here.

In my opinion, your solution looks great and I can easily see a component based on that.

*If you don’t want/can’t use those components together for some reason, you could manage the pages size on @atlaskit/dynamic-table by creating some logic to create the rows array with the required size, having objects for the valid positions (I can’t even describe how ugly this is).

Paulo Alves.


Thank you, I decide to use dynamic-table with pagination.