-
Notifications
You must be signed in to change notification settings - Fork 755
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
Duplicate AJAX requests using the filter formatter widget with server-side options #372
Comments
Hi @sbine! Just letting you know I'm back and I'll be looking into this issue. Thanks for reporting it! |
Thank you @Mottie! I spent several hours today attempting to debug this issue and came up with a temporary fix. Starting on line 279 of jquery.tablesorter.pager.js, changing:
to
gets rid of one of the duplicate requests. |
Hmm, if you're not triggering an update, then the plugin doesn't update the cache... and umm, I guess since you're using ajax the server does all the sorting/filtering, you don't need to cache the data anyway. So, I guess just completely remove that |
Right, caching becomes unnecessary in my case. Perhaps caching-specific code in each widget could be skipped over when its respective server-side option is enabled? |
Ok, I'm hoping this bug is all squashing and isn't sticking to my shoe... I don't wanna look because it'll be icky. LOL |
Hi again Mottie! As much as I hate bugs... it seems removing the update trigger does actually break table functionality. I upgraded to 2.11.0 this morning and had to make these changes to get my tables to function: jquery.tablesorter.pager.js line 157, add back:
jquery.tablesorter.js line 346, add the following:
updateComplete was not being triggered on tables without the filter formatter widget, but with all server-side options set. My tables that do use the filter formatter widget were working without this change. Sorry for the trouble, and thank you for your help :) |
Hi @sbine! Thanks for sharing how to fix it. I'll get that updated in a few minutes. Edit: Umm, I guess the line numbers don't match the version I have... basically the same place right? |
Yes, the update trigger goes where it was before. The second change was at the end of the |
I'm using tablesorter with server-side pagination, sorting, and filtering. It seems that setting initial filter values using the filter formatter widget causes two (sometimes three) identical AJAX requests to be fired when the table is first loaded. Subsequent filters behave as expected.
For example:
sends the request twice
Since this only occurs when the table is first loaded I suspect it may be related to #343. Any help would be appreciated, and thank you for your work on this amazing plugin.
The text was updated successfully, but these errors were encountered: