Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Pagination data is not available #21

Open
wbm-sbasler opened this issue Jul 7, 2022 · 0 comments
Open

Pagination data is not available #21

wbm-sbasler opened this issue Jul 7, 2022 · 0 comments

Comments

@wbm-sbasler
Copy link

From the storyblok documentation, the pagiantion data will be in the response headers.
https://www.storyblok.com/docs/api/content-delivery#topics/pagination

But the content object from useContent does not provide these informations.

We are using the actual 0.3.0. release

Examplecode:

const { search, content, loading, error } = useContent(`BlogListing-${props.type}${route.value.query.cid}`);

const custom = {
      starts_with: `${root.$i18n.locale}/`,
      sort_by: 'content.datePublished:desc',
      page: currentPage,
      per_page: 3,
      filter_query: {
        component: {
          in: 'PageBlog',
        },
      },
    };

onSSR(async () => {
      await search({
        cache: true,
        relations: 'PageBlog.author',
        custom: custom,
      });
    });

Expectation:
The following data will be provided in content object

per-page: 2
total: 3

Actual Result:
Pagination data not available

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant