This PR introduces a reusable page-based pagination component for tables (such as blogs, tags, etc.). It relies on the backend's pagination implementation, which returns a meta object, as shown below.
Instead of using the links array, we calculate the number of pages using current_page and last_page. This approach offers a simpler implementation and greater flexibility for customization.
Additionally, the tags query has been updated to include all relevant interfaces, with added support for passing a "page" query parameter in the request.
p.s Needs content-manager permissions (bearer token set to .env) to test.
This PR introduces a reusable page-based pagination component for tables (such as blogs, tags, etc.). It relies on the backend's pagination implementation, which returns a meta object, as shown below.
Instead of using the
links
array, we calculate the number of pages usingcurrent_page
andlast_page
. This approach offers a simpler implementation and greater flexibility for customization.Additionally, the tags query has been updated to include all relevant interfaces, with added support for passing a "page" query parameter in the request.
p.s Needs content-manager permissions (bearer token set to .env) to test.
Example meta object returned from backend: