You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a table set up, with a custom pagerComplete handler(that wires a bunch of stuff up in the rows). It is being fired twice each time the table is sortered, paged, or anything that requires it to fetch the table. Once just after the ajax call is made, and once after it is complete.
I know it's firing twice, because I have console.log() statements in the handler.
Here is my trimmed down sorter code:
$('#MyTable').tablesorter({headers: {0: {sorter: 'iso8601date'},4: {sorter: false},5: {sorter: false}},textExtraction: {0: customextractorfunction},}).bind('pagerInitialized',function(e,c){console.log('pager initialize');//also a call to wire up the first page}).tablesorterPager({container: $("#pager"),output: '{page} / {totalPages}',ajaxUrl: "myurl",page: 0,customAjaxUrl: function(table,url){//a bunch of url processing codereturnurl;},ajaxProcessing: function(data){//a whole bunch of code goes here }}).bind('pagerComplete',function(e,c){console.log("page complete callback");//also a call to wire up the page});
This isn't a huge problem, b/c it's not a lot of processes, but it also runs the creating of the cache and everything else twice, which may be more problematic, especially with large pages.
The text was updated successfully, but these errors were encountered:
I'll try to take some time looking into this issue this weekend.
I don't see it in the code above, but because I want to make sure, you're not using the filter widget - I see the extra comma after the textExtraction function, so I guess it could have been shortened for posting here?
Also, just so you know that in the next update, I plan on making it optional for the ajaxProcessing function to return parameters; so you then have the option of building the table yourself within that function and include any extra wiring up yourself. Then you won't need to bind to the pagerComplete callback to make additional changes.
oops! Got a little over zealous with my cutting out the excess, I have this:
sortList: [[0, 0]]
after the text extractor.
no filtering through the tablesorter plugin.
My processing isn't to complex, it's more the caching and everything that tablesorter does that is concerning. It's updating the cache, and redrawing the table twice. (I turned debug on to see this).
would a screenshot or copy paste of what ends up in the debug log be helpful?
I have a table set up, with a custom pagerComplete handler(that wires a bunch of stuff up in the rows). It is being fired twice each time the table is sortered, paged, or anything that requires it to fetch the table. Once just after the ajax call is made, and once after it is complete.
I know it's firing twice, because I have console.log() statements in the handler.
Here is my trimmed down sorter code:
This isn't a huge problem, b/c it's not a lot of processes, but it also runs the creating of the cache and everything else twice, which may be more problematic, especially with large pages.
The text was updated successfully, but these errors were encountered: