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

Ajax request firing multiple times on page load #1384

Closed
KaiserWolfTaco opened this issue Apr 11, 2017 · 10 comments
Closed

Ajax request firing multiple times on page load #1384

KaiserWolfTaco opened this issue Apr 11, 2017 · 10 comments

Comments

@KaiserWolfTaco
Copy link

Hi,
First off, thanks for maintaining this repo. Tablesorter fits pretty much all my needs and is by far the most robust table I've used. Anyways, this seems to occur in versions v2.28.6 and up. I have a table that uses ajax to get its rows. When the page loads, the table fires off a random number of GET requests to my backend server. Sometimes its 5, other times its 20. I have no retry logic in my code and when i downgrade tablesorter to version 2.28.5, this behavior stops. Any ideas?
Thanks

@Mottie
Copy link
Owner

Mottie commented Apr 11, 2017

Hi @KaiserWolfTaco!

Mmm tacos... now I'm hungry. Errr, I think this might be the same issue as reported by @alexweissman in IRC.

I think I've isolated the problem, but try setting the pageReset option to false first to see if that prevents the issue you're seeing from occurring. If that does fix it, then I'll release a new patch.

@KaiserWolfTaco
Copy link
Author

Thanks for the prompt reply. Tacos are awesome. Sorry, but that didn't fix the problem. I tried with 2.28.7 and I should note I'm using "pager_pagerReset" with widgetOptions. Here are some of my settings:

pager_output: "{startRow} - {endRow} / {filteredRows} ({totalRows})",
pager_removeRows: true,
pager_css: {
container: "tablesorter-pager",
errorRow: "tablesorter-errorRow",
disabled: "disabled"
},
pager_ajaxUrl: "admin/users_rows/page/{page}/size/{size}/sort/{sortList:column}/filter/{filterList:filter}",
pager_pageReset: false,
pager_startPage: 0,
pager_size: size,
pager_savePages: false,
pager_processAjaxOnInit: true,

@Mottie
Copy link
Owner

Mottie commented Apr 11, 2017

Oh... well I have updated the filter and pager widget/addon in the master branch. Please try the update and see if that fixes the problem. If not, I'll need to investigate further.

@KaiserWolfTaco
Copy link
Author

Sorry, that didn't work either. Jquery is at #3.2.1

@Mottie
Copy link
Owner

Mottie commented Apr 12, 2017

Is there any way you could modify the demo I shared to reproduce the problem?

@alexweissman did this last update fix the problem you were having?

@KaiserWolfTaco
Copy link
Author

Which demo?

@Mottie
Copy link
Owner

Mottie commented Apr 13, 2017

sorry... this demo.

@fernandog
Copy link

@Mottie i learned that sometimes you need to do this: @KaiserWolfTaco otherwise user don't get a notification in email. just the bell in github page

@Mottie
Copy link
Owner

Mottie commented May 24, 2017

Another pager widget update is available in v2.28.11, please let me know if this problem still occurs.

@KaiserWolfTaco
Copy link
Author

That fixed it! Thanks Mottie

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

3 participants