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

Add pagination #973

Open
timuric opened this issue Oct 17, 2023 · 3 comments
Open

Add pagination #973

timuric opened this issue Oct 17, 2023 · 3 comments

Comments

@timuric
Copy link
Member

timuric commented Oct 17, 2023

Add pagination with page numbers

@timuric timuric added good first issue Good for newcomers help wanted Extra attention is needed feature request navigation labels Oct 17, 2023
@grzegorzpokorski
Copy link
Contributor

I think it would be difficult or inpossible to achieve since we can base only on cursors provided from Saleor graphql api. As I know building traditional pagination with page numbers is not posible in our case - we can only pass a cursor and fetch specyfic amount of rows after or before specyfic cursor. We can't offset rows in graphql query. Maybe better solution will be making "infinite" pagination or maybe better idea would be to improve the existing pagination by adding link to previous page? That's only my point of view and maybe I wrong.

@typeofweb
Copy link
Contributor

Or opening an issue in saleor/saleor to see if numeric pagination is coming any time soon (or ever) 😄

@zaiste zaiste removed good first issue Good for newcomers help wanted Extra attention is needed labels Nov 27, 2023
@grzegorzpokorski
Copy link
Contributor

Or opening an issue in saleor/saleor to see if numeric pagination is coming any time soon (or ever) 😄

I found a similar discusion and I think that this response in the discussion should give a clear signal that the current method of paginating data will not be changed, especially since the Saleor platform seems to be focused mainly on big stores with a large number of products, where relying on cursors is more efficient.

So it seems if we want to create a number based pagination we have to use service like Algolia to index all products at build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants