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

Error when adding Filter Widget by trigger #330

Closed
megatom opened this issue Jun 6, 2013 · 2 comments
Closed

Error when adding Filter Widget by trigger #330

megatom opened this issue Jun 6, 2013 · 2 comments
Labels

Comments

@megatom
Copy link

megatom commented Jun 6, 2013

Hello,
i updated my tablesorter version from 2.7 to 2.10 (i missed some versions, i know)
After this the following code from your example is not working anymore:

if($(".sortableFilter").length){ // only applay filter when class is set on table
    // Update the list of widgets to apply to the table (add or remove) 
    $(".sortableFilter").data("tablesorter").widgets = ['filter'];  
    // This method applies the widget - no need to keep updating 
    $('.sortableFilter').trigger('applyWidgets'); 
}

Now i tested to downgrade versions and i tried 2.8.2, with this version code is running and filter widget is applied.
With 2.9.0 i get the same error in console:

TypeError: b.filter_regex is undefined

So what is wrong with my implementation?
Did i miss any changes?

Thx for help

@ajaydwarkani
Copy link

I am also getting the same issue when using the latest 2.10 tablesorter and widget plugin. And when I downgrade to 2.8 version the code is working fine.

I get the following error when using 2.10 version
"uncaught TypeError: Cannot set property 'child' of undefined" at line 9 of jquery.tablesorter.min.js

Here is my code

$(document).on('click', '#searchfilter i', function () {
    $('#jobs-table').data('tablesorter').widgets = ['filter'];
    $('#jobs-table').trigger('applyWidgets');
    return false;
});

Also how can I remove or destroy just the "filter" widget. I am trying to show and hide filter widget on a click of search button.

Appreciate your help fixing this issue.

@Mottie
Copy link
Owner

Mottie commented Oct 9, 2013

Hi guys!

Sorry for taking so long to respond.

I did find the problem causing the javascript errors and I will have it fixed in the next update. Thanks for reporting it!

@Mottie Mottie closed this as completed in c962a7c Oct 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants