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

Disabling pagination #14

Closed
TomCaserta opened this issue Feb 21, 2024 · 2 comments
Closed

Disabling pagination #14

TomCaserta opened this issue Feb 21, 2024 · 2 comments

Comments

@TomCaserta
Copy link

First of all thank you for creating this library.

I'm looking to just pull down a list of content and essentially ignore pagination. I've tried setting pagination: { mode: 'off' } when using the useList hook however it seemingly is not having an effect.

I see in the code that it is defaulting to the first page and a set page size. I can set the page size to -1 which I imagine will have the effect of returning all of the content but it looks like it will still make the aggregate count request.

Am I correct in this statement? Would you be willing to accept a PR that will disable the aggregate count request and default the page size to -1 when the pagination mode is set to off?

Thanks,

@tspvivek
Copy link
Owner

tspvivek commented Mar 8, 2024

You are correct, Addition to your fix we can return the length of the result as count instead of aggregate request to avoid breaking existing users, who might have used count in any means.

@tspvivek
Copy link
Owner

@TomCaserta Fixed as part of v1.0.37

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

No branches or pull requests

2 participants