Pagination :: how to read selected page from pagination component?

how do I implement pagination with REST API if the server returns this:
"page": 1,
"per_page": 6,
"total": 12,
"total_pages": 2,
"data": [{...},{...},...]

  1. I need to be able to set pageSize in the table component
  2. I need to be able to read the current page which is selected in the paginator control

For now I ended up with this workaround
...?page={{usersTable.paginationOffset / usersTable.displayedData.length + 1}}
where I had to adjust table height so that paginationOffset is increased by 6

Is there a more elegant way to solve this issue?

Hi @Sergey :wave: thanks for reaching out with this question! Do you think that the approach outlined in the Server side table pagination documentation would potentially suit your use case? The examples depicted in the documentation mostly reference database queries, but the same concepts could likely be applied to your REST API given that all of the necessary pagination state data appears to be returned in each response body :grinning_face_with_smiling_eyes: