kjemmo
kjemmo

Reputation: 41

Jquery tablesorter: Select for external filter instead of input?

Hi I am trying to add add select tag outside the table and make it filter a specific column in the table.

Several others have asked about this, but all the 'working' examples I have found are actually not working:

Here is an example:

Has something changed with the plugin?

All guidance are appreciated.

Thanks.

Upvotes: 2

Views: 649

Answers (1)

Mottie
Mottie

Reputation: 86403

Actually there was a bug in the last update which has been fixed and is currently only available within the working branch (patch).

// line 1143 - 1144 of jquery.tablesorter.widgets.js
ffxn = wo.filter_columnFilters ? 
    c.$filters.add(c.$externalFilters).filter('[data-column="'+ columnIndex + '"]').find('select option:selected').attr('data-function-name') || '' : '';

Here is an updated demo using the working branch code.

I'll push an update today to get this fix into the master. Sorry about that.


Master branch updated. The demo from your question is working now.

Upvotes: 1

Related Questions