Closed ngels closed 4 years ago
In cursor-based pagination, it is impossible to use the traditional page numbering pagination, because if the user is at page 1 it is impossible to figure out what's the cursor at the end of page 2 (which is required to display the page 3). If you want to support this feature, you should use the traditional offset based pagination instead of cursor-based pagination.
I want to do pagination with link to specific page like. the front end will look like this
click on a number will have as effect bring to the specific page. sequelize-cursor-pagination seems to start always from the first page.
const whatIget = await Model.paginate({ limit: 2, desc: true });
const whatIget = await Model.paginate({ limit: 2, desc: true, after:
whatIget
.cursors.after });