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

resetToLoadState with pager plugin followed by column sort causes error #1311

Closed
nessalc opened this issue Nov 4, 2016 · 1 comment
Closed

Comments

@nessalc
Copy link

nessalc commented Nov 4, 2016

There's probably a better way to do what I'm trying to do, but I discovered this apparent issue along the way. In a certain set of circumstances, the pager plugin and resetToLoadState methods don't get along:

To reproduce:

  1. load page
  2. trigger resetToLoadState
  3. click on column heading to sort
    • Chrome gives the following: jquery.tablesorter.pager. Uncaught TypeError: Cannot read property 'ajax' of undefined
    • Firefox gives the following: TypeError: p is undefined (also pointing to jquery.tablesorter.pager.)

If, however, the pager is destroyed, then restored, the error does not occur.

I have been able to do this using developer console using Chrome 54.0.2840.71, 54.0.2840.87 and Firefox 47.0, 48.0.2, 49.0.2 on the example page here.

@Mottie
Copy link
Owner

Mottie commented Nov 5, 2016

Hi @nessalc!

That does sound like a problem. I'll spend more time troubleshooting this issue when I get some free time.

Have you tried the pager widget? It is essentially the same as the plugin rewritten into widget form although it should behave much better when using the resetToLoadState method.

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