Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript on pagination. #398

Open
Mirare23 opened this issue Mar 2, 2024 · 0 comments
Open

Typescript on pagination. #398

Mirare23 opened this issue Mar 2, 2024 · 0 comments
Labels
question Further information is requested

Comments

@Mirare23
Copy link

Mirare23 commented Mar 2, 2024

So im trying to get pagecount on responsed. Here's what i do

const { data: BlogResponses } = await useAsyncData("blog", () => find<IAttributes>("blogs", { populate: "*", sort: "id:desc", pagination: { page: 1, pageSize: 10, withCount: true }, fields: ["title", "description", "slug", "Date", "Is_recomended"], }) )

onMounted(() => { maxPage.value = BlogResponses.value?.meta.pagination.pageCount })

Im getting typescript error that pageCount is not exist. i checked the types on the modules it provide this

image

What i did wrong? im new to TS .

@Mirare23 Mirare23 added the question Further information is requested label Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant