Skip to content

Via External tablesorter filter: load two datasets #1844

@elli-pirelli

Description

@elli-pirelli

Hi,

I absolutely love the tablesorter but I have a question/request.

I'm using external buttons to preload tablesorter data using data-filter-column and data-filter-text=.
I wonder if it's possible to either always load all rows which are empty on data-filter-column="0" or load a data-set in data-filter-column="0" that is maybe called 'all'?

This is my script:

`$('button[data-filter-column]').click(function() {

var filters = [],

config = $table[0].config,

$t = $(this),

col = $t.data('filter-column'), 

txt = $t.data('filter-text') || $t.text(); 

filters[col === "all" ? config.columns : col] = txt;

$.tablesorter.setFilters( $table, filters );

return false;           

});`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions