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

saveSort + pager widget shows all rows on reload #1525

Open
a-mair opened this issue Mar 14, 2018 · 7 comments
Open

saveSort + pager widget shows all rows on reload #1525

a-mair opened this issue Mar 14, 2018 · 7 comments

Comments

@a-mair
Copy link
Contributor

a-mair commented Mar 14, 2018

Hi,

if both pager and saveSort widget are used the pager shows all rows if that tablesorter already has saved its sorting. You can see it at http://jsfiddle.net/amair/0m4hntg9/

First "run" it, then click on "Header" to sort the table. If you now "run" it again it will show all table rows.

Best regards,
Andreas

@Mottie
Copy link
Owner

Mottie commented Mar 14, 2018

Hi @a-mair!

That does appear to be a bug... I'll take a look soon.

@Mottie
Copy link
Owner

Mottie commented Mar 18, 2018

Fixed in v2.30.0!

@a-mair
Copy link
Contributor Author

a-mair commented Mar 19, 2018

The reported problem is gone, but now it won't save sorts.

BTW: Firefox's web developer console reports "Tablesorter Warning! "table.config.saveSort" option not recognized", even if the saveSort widget is loaded.

@Mottie
Copy link
Owner

Mottie commented Mar 19, 2018

DOH... ok, I'll look into that.

And saveSort is a widgetOption, not a core option.

@Mottie Mottie reopened this Mar 19, 2018
Mottie added a commit that referenced this issue Mar 19, 2018
@Mottie
Copy link
Owner

Mottie commented Mar 19, 2018

Please check the change in the master branch to see if it fixes the problem. I'll push a new release if it does.

@a-mair
Copy link
Contributor Author

a-mair commented Mar 19, 2018

Sorry, but the demo at jsfiddle still doesn't restore sort completely.
You can see it yourself:
First "run" and click "Header" until you get descending sorting (Arrow's looks like "V", session storage holds "[0,1]" for sortList). Now "run" again. Arrow still looks like "V" but it's ascending sorting.
If you now move to the next page then sorting is fine, if you then go back sorting is also fine.

@Mottie
Copy link
Owner

Mottie commented Mar 19, 2018

Grrr, yeah that is a problem.

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

No branches or pull requests

2 participants