-
Since pagy_cursor is outdated(doesn't work with Pagy 6.0) and last pagy_cursor official release update is from february, are there any plans to support id based pagination(or cursor pagination)? Offset not only is slow for large tables, but also when using pagy + infinite scroll for reverse ordered elements(for example chat messages) in conjunction with turbo broadcast to render new page elements, it returns duplicated elements(since the offset would not be correct) If you use last id + limit, instead of offset would solve the problem What would be the easiest way to either: support removal of offset and relying on last_id of a known rendered element Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi @danielnc. Pagy 6 has just been released, so I guess an update of pagy_cursor may follow later, however please, ask in their repo. There are currently no plan to support id/cursor pagination in the pagy core repo, since that would be too dependent on the ORM and pagy is meant to be agnostic.
Yeah... I heard @excid3 commenting in a Remote Ruby episode, that in order to avoid the turbo problem with pagination, they don't update the list in their Jumpstart, unless on the first page or something.
It looks like your app might benefit from fast_page.
I think this short post from @benkoshy may help. |
Beta Was this translation helpful? Give feedback.
Hi @danielnc.
Pagy 6 has just been released, so I guess an update of pagy_cursor may follow later, however please, ask in their repo. There are currently no plan to support id/cursor pagination in the pagy core repo, since that would be too dependent on the ORM and pagy is meant to be agnostic.
Yeah... I heard @excid3 commenting in a Remote Ruby episode, that in order to avoid the turbo problem with pagination, they don't update the list in their Jumpstart, unless on the first page or something.
It looks like your app might ben…