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

Adding/removing rows = pager troubles #981

Closed
meatheadmike opened this issue Jul 30, 2015 · 3 comments
Closed

Adding/removing rows = pager troubles #981

meatheadmike opened this issue Jul 30, 2015 · 3 comments

Comments

@meatheadmike
Copy link

So here's my scenario... I have a table. I go to do a search via ajax. When it comes back I update the header and the rows. So in other words I'm completely rebuilding the table on each search. My problem is that the pagination acts pretty funky. Basically after the search is done everything looks ok. But click on the "last" button and you'll see that the pagination resets to the previous size. What gives? Is this a closure somewhere in my code that I'm not seeing? Is there a better way to kill/rebuild the tablesorter+pager?

Here's a demo that I conjured up:
http://jsfiddle.net/1avd9pu3/2/

@Mottie
Copy link
Owner

Mottie commented Jul 30, 2015

Hey @meatheadmike!

It looks like the destroy method isn't unbinding the pager controls. I'll get to work on that fix.

@Mottie Mottie closed this as completed in d8fd020 Jul 30, 2015
@Mottie
Copy link
Owner

Mottie commented Jul 30, 2015

Done & verified - the demo you shared above works perfectly now 😸

@meatheadmike
Copy link
Author

Thank you again. You are definitely a JQ master!

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