Skip to content

Conversation

AhmadBilalAmjad
Copy link

This PR fixes a pagination issue in the getProductsList function. By updating the default pageParam from 1 to 0, we ensure the function starts pagination from the first page of results. Previously, starting at pageParam = 1 caused an offset that skipped the initial set of products. Now, pagination will begin correctly at the first record set, providing a complete list of products without omissions.

Changes:

  • I updated the default pageParam from 1 to 0 to avoid skipping the first page of records.

Copy link

vercel bot commented Nov 13, 2024

@AhmadBilalAmjad is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextjs-starter-medusa-38xf ❌ Failed (Inspect) Nov 13, 2024 10:24am

@willbouch
Copy link
Contributor

Hi @AhmadBilalAmjad ! Thanks for the contribution and sorry for the very late reply. I believe this was fixed with the introduction of const offset = (_pageParam === 1) ? 0 : (_pageParam - 1) * limit;

Will be closing this PR, feel free to re-open if the issue still exists

@willbouch willbouch closed this Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants