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

Missing record on pagination when records are sorted #553

Open
echan00 opened this issue Aug 16, 2017 · 3 comments
Open

Missing record on pagination when records are sorted #553

echan00 opened this issue Aug 16, 2017 · 3 comments

Comments

@echan00
Copy link

echan00 commented Aug 16, 2017

I have records that are sorted by an attribute called priority. And the priority is the same for two particular records, item A and item B, in my list.

When those two records, item A and item B, are between two pages. I have found that it is possible to see item A on one page and item A again on the subsequent page (item B is missing from pagination).

I kind of see how this can be a problem, but didn't expect a gem of this popularity to have this issue. Is there a solution around this problem?

@abartier
Copy link

abartier commented Oct 5, 2017

I'm seeing the same thing.
Any update on this ?

To be confirmed but I just see this between page 1 and 2.

@echan00
Copy link
Author

echan00 commented Oct 5, 2017

While I haven't tried this myself, I think sorting the record by id before sorting by another attribute might solve it.

I haven't tried it myself, but I imagine it would work. Let me now if it does.

@abartier
Copy link

abartier commented Oct 5, 2017

I don't see how to order by id then another attribute will work because of ActiveRecord .order will stack and we cannot get the final order we want/should?

I think I'll switch to Kaminari for the moment :(

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