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

proposal: pagination with numbers #233

Closed
brunocorrea23 opened this issue May 26, 2023 · 0 comments · Fixed by #242
Closed

proposal: pagination with numbers #233

brunocorrea23 opened this issue May 26, 2023 · 0 comments · Fixed by #242
Labels
enhancement New feature or request

Comments

@brunocorrea23
Copy link
Contributor

Today a cursor is being passed on the URL params. Would it be better to have a number for the pagination?

A suggestion would be to pass the page number ('n') as an optional parameter to the getAllItems() function on the db.ts file. Then iterate on the list (with the the {limit: 10} option, for example) until you reach the n-th set of items.

This way index.tsx file wouldn't have to know anything about a cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant