nuxt-modules / nuxt-modules/strapi
Typescript on pagination.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 717
- Forks
- 89
- Avg merge
- 7h 3m
- Merged PRs (30d)
- 6
Description
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
What i did wrong? im new to TS .
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report mentions the find call and the BlogResponses value but no repository file or test. Start by inspecting the TypeScript response type used by find and compare it with the pagination response described in the issue. Done means the reported pageCount access is correctly typed without introducing regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100