Skip to content

Pager ajaxProcessing break optional headers  #1343

Closed
@CiTRO33

Description

@CiTRO33

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions