-
Notifications
You must be signed in to change notification settings - Fork 753
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
Table using Filter widget and filter-select drop-down does not work for columns with values containing quotes #1527
Comments
Hi @attitudemattrs! There is an issue with the filter select building code that doesn't handle quotes properly. I'll get it fixed ASAP, but it still won't work as expected because the filter widget uses quotes to exactly match the content. Right now (without the fix), you can search the parsed content by setting the following three class names on the header (demo): <th class="filter-select filter-match filter-parsed">...</th> This won't show the quotes in the select. Once the fix is in place, you'll only need one class in the header: <th class="filter-select">...</th> And you'll need to disable the "exact" filter matching for that column (make sure to set the desired column zero-based index): $(function() {
$("table").tablesorter({
theme: "blue",
widgets: ["zebra", "filter"],
widgetOptions: {
filter_excludeFilter: {
2: "exact"
}
}
});
}); |
Oops, I guess the "right now" demo won't work if you use text instead of numbers... anyway, the fix is available in the master branch. |
Wow, thanks for the quick turn-around on the fix. I downloaded the master branch and tested the fix with my sample case and it worked like a champ, no changes required to add the filter_excludeFilter either, which is great. I will work towards trying it out in the real code soon. Just to gauge timing on my end, do you know when the next versioned release is scheduled from the master? We are currently using the distribution version with the combined widgets file jquery.tablesorter.widgets.js and the .min.js files. I can adjust accordingly to incorporate your recent fix, but if the next release is due out soon I will wait for that. BTW, thank you so much for all the work on this plugin. The plugin is excellent and very robust and flexible. The documentation (with examples) and responsive support is fantastic! Again, I greatly appreciate the quick turn-around on this issue. Far beyond my expectations. Really. |
I need to find and spend some time fixing another bug, so hopefully, I'll get a new release out by tomorrow sometime. |
Thanks again! Greatly appreciated. You're awesome. |
V2.30.0 is now available. |
I am currently using v2.29.4 with the Filter widget. In this particular case the table in question has column data that contains quotes in it. For example: Aaron "Quote" Example. The data appears correctly within the table column and the filter's select drop-down, however, when you choose the quoted value from the drop-down, all rows are filtered out and no data is shown in the table. I have been able to construct a very simple example that demonstrates the problem. I have attached a zip file with this sample HTML file along with the JQuery and Table Sorter code being used.
Any help would be greatly appreciated.
TS-Filter-Example.zip
The text was updated successfully, but these errors were encountered: