Closed fortm closed 7 years ago
Only when I am running as below on second ajax request without table , errors go away related to refreshToggle -
$(window ).unbind( "resize.table-987" );
Is there any wrong configuration in my setup ?
Try out 3.0 and let me know if this doesn’t work for you!
I replaced 2.0.1 tablesaw.js with latest v3.0.0-beta.0 tablesaw.jquery.js and same with css I am using jquery 1.8.3
On resizing console on pages without table , I get now below error ->
tablesaw.js:521 Uncaught TypeError: Cannot read property 'cells' of undefined
I am current intercepting all Ajax requests and doing as below - Since without this even new version gives error
XMLHttpRequest.prototype.send = function(data) {
$(window).OffRegexNameSpaces("resize",/^table-\d{3}/);
send.call(this, data);
};
})(XMLHttpRequest.prototype.send);
For regex function, using below link -
[http://stackoverflow.com/questions/38806912/unbind-to-multiple-namespaced-events-in-jquery]
I think I’m going to need a test case to fix this properly. I don’t quite understand what you’re doing. Can you put a reduced test case that shows the problem on jsbin (or similar)? If you do this soon, it’ll probably make it into 3.0. Thank you!
Please reopen with a test case!
Thanks for awsome plugin
I am facing an issue. The tablesaw plugin is activated on an ajax page that contains table with toggle enabled. Everything works fine on that page until switching to another page by second ajax request where there is no tablesaw table.
init code -
CSS class for table - tablesaw tablesaw-columntoggle
Also data-tablesaw-priority is provided for each column between value 1 to 6
resizing console in chrome gives following error in second tab without table: seems like javascript binding is causing some issue
tablesaw.js:470 Uncaught TypeError: Cannot read property 'eq' of undefined
This error happens only with Toggle option and on pages where there is no table on resize.
How can we fix this ?