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

bug with filter_startsWith property to True in FF/Chrome #55

Closed
aarkay18 opened this issue Apr 23, 2012 · 2 comments
Closed

bug with filter_startsWith property to True in FF/Chrome #55

aarkay18 opened this issue Apr 23, 2012 · 2 comments
Labels

Comments

@aarkay18
Copy link

I got the latest version 2.1 of tableSorter plugin and tablesorter.widget.js files today. Its a great plugin and loving it. But found an issue with this update.

I was testing with filter_startsWith property set to True. It was working in IE but not in FF/Chrome

So I found the issue and fixed it. In the file "jquery.tablesorter.widget.js" file, in the code for "Filter" widget following line

x = ($td.eq(i).text() + t).toLowerCase().indexOf(v[i]);

has to be replaced with

x = $.trim(($td.eq(i).text() + t)).toLowerCase().indexOf(v[i]);

That is trimming the content of column and finding the indexOf filter text. With some spaces, it was always getting the index to be greater than zero, and thus making it false always. Result is no rows are shown for the filter text.

Hope this helps. Thanks

But a great plugin. works like a charm. Thanks a lot.

@Mottie
Copy link
Owner

Mottie commented Apr 23, 2012

Thanks for reporting this! I'll get it fixed in the next update.

Mottie added a commit that referenced this issue Apr 24, 2012
@Mottie
Copy link
Owner

Mottie commented Apr 24, 2012

Thanks again!

@Mottie Mottie closed this as completed Apr 24, 2012
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

2 participants