Repository navigation
fix(examples/react/algolia): compute the next page from 'lastPageParam' and the optional 'nbPages' - #11967
Conversation
…m' and the optional 'nbPages'
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to Pagination stops at the last available page, and no actionable merge risk remains. Pre-merge checks |
|
|
View your CI Pipeline Execution ↗ for commit 3b80de3
☁️ Nx Cloud last updated this comment at |
size-limit report 📦
|
🚀 Changeset Version Preview2 package(s) bumped directly, 23 bumped as dependents. 🟩 Patch bumps
|
🎯 Changes
In
@algolia/client-search5.59.0,pageandnbPageson the search response are optional, sosearch()computingpage + 1 < nbPagesfails type-checking in thealgoliaexample.search()returns{ hits, nbPages }, withnbPagesfalling back to0when it is missing.useAlgoliacomputes the next page ingetNextPageParamfromlastPageParamandnbPages, as described in "What if my API doesn't return a cursor?" in the infinite queries guide, instead of reading it from the response'spage.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit