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

Pager ajaxProcessing break optional headers #1343

Closed
CiTRO33 opened this issue Dec 29, 2016 · 1 comment
Closed

Pager ajaxProcessing break optional headers #1343

CiTRO33 opened this issue Dec 29, 2016 · 1 comment

Comments

@CiTRO33
Copy link

CiTRO33 commented Dec 29, 2016

Hi @Mottie,
today i upgraded from Version 2.27.8 to Version 2.28.3 ( Tablesorter).
Pager: Version 2.27.7 to 2.28.0

With the new Version i got a TypeError: th is undefined in the ajaxProcessing function. (not minified Version )
I figured out, that in file widget-pager.js the condition
if ( th && th.length === hl ) {
has been removed.

My pager_ajaxProcessing function:
pager_ajaxProcessing : function(result, table, xhr) { if (result && result.hasOwnProperty('html_rows')) { result.total = result["total_rows"]; result.filteredRows = result["filtered_rows"]; var html_rows = result.html_rows; result.rows = $(html_rows); return result; } }
if i include result.headers = [] in the function it will work again. But i think i would break Line 790
$h.find( '.' + ts.css.headerIn ).html( th[ j ] ).append( icon );
because the html function would return a value because th[j] is undefined.

Left: Version 2.28.0
Right: Version 2.27.7
grafik

@Mottie
Copy link
Owner

Mottie commented Dec 29, 2016

Hi @CiTRO33!

Thanks for catching that! I'll have it fixed in the master branch shortly.

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