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

Sorting reverts to default when paginating #111

Open
AnthonyDeSimone opened this issue Jan 4, 2017 · 6 comments
Open

Sorting reverts to default when paginating #111

AnthonyDeSimone opened this issue Jan 4, 2017 · 6 comments

Comments

@AnthonyDeSimone
Copy link

I'm currently working with 1.2.0, but confirmed this is not an issue on 1.1.2.

Any sorting options (column and direction) is lost and reverts back to the default sorting when a new page is chosen. I just created a new project with the github tutorial code as the basis. If I downgrade back to 1.1.2, it works as expected.

Did anything on the interface side change between these two versions that requires a different setup in order for this to work properly?

@anthonycreates
Copy link

I am seeing the same behavior. Can't figure out why it's happening. I'm losing params after clicking a pagination button.

@vincenzodev
Copy link

Try this: https://github.com/vincenzodev/smart_listing

ColinW520 added a commit to ColinW520/smart_listing that referenced this issue Mar 13, 2017
@ljachymczyk
Copy link
Member

Can you check if this thing still happens for you with the newest gem version?

@dkru
Copy link

dkru commented Oct 23, 2017

In version 1.2.1 same problem

Not saving filter params in cookies

I think trouble with link's generation, as pagination link's not having sort parametr.

If i right understanding sort params will be stored in cookies, but in cookies stores only memorize_per_page, maybe forgot add code for saving into lib/smart_listing.rb ?

@AnthonyDeSimone
Copy link
Author

Still an issue as far as I can tell.

@vincenzodev's solution seems to solve it.

@mizinsky
Copy link

@vincenzodev's solution base on changing kaminari dependency.
I try to reproduce this problem on Rails 4 and 5 and everything is working properly (with kaminari 0.17).
Can I ask you for more details on that issue, maybe Gemfile.lock?

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

6 participants