-
Notifications
You must be signed in to change notification settings - Fork 754
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
Filter filtering on parsedData #983
Comments
Hi @JeroenNX! It might also depend on the parser. Some parsers have a Looking at the built-in parsers, only the "url" and "image" parsers have this flag set. Also, it depends on the filter type. The following will use parsed data if the parser type is "numeric":
It would help me troubleshoot the issue better if you could provide an example or more details. |
Hi @Mottie, Thanks for your quick reply! Search in the date column for '20' => no results. Previously I was using version 2.19.1 with the exact same HTML/JS and with that version I was able to search for '20' or '07-2015' and get the expected results. P.S.: I know there's a parser for dates, just have not used it yet, and only need simple searches for now (like '07-2015' for every entry in July); could it be that the content type in a column is automatically detected and that in this case it defaults to one that uses the parsed data, and that this behavior was introduced with a recent update? |
Hmm, ok internally when you use a data-attribute to sort on, it uses that as the unparsed value in the filter. I'll have to do some internal fiddling to save the actual cell content as well. Anyway, if you only added the Try this (demo; use $(document).ready(function()
{
$('.tablesorter').tablesorter(
{
usNumberFormat: false,
dateFormat: 'ddmmyyyy',
widgets: ['filter']
});
}); If you do need the |
Hmm, I'll have to think about this some more... Right now if a data-attribute is used, both the parsed and raw data have the same content. If I save the raw text from the table when a data-attribute is set, a bunch of filter widget searches fail. Because, the filter will see the data-attribute content as parsed and the raw cell content as unparsed. And most of the time it is searching unparsed content. So, I either have to just leave everything the same, or add a What do you think @TheSin-? |
Thank you for your elaborate answer. Maybe just leave everything the same and include a note in the docs for |
Hi,
Is it possible that with the latest version the filters always filter on parsedData even though:
I have a custom text extraction function (for sorting) that is also being used for filtering even with the above settings; could not observe this behavior with the previous version(s).
Regards,
Jeroen
The text was updated successfully, but these errors were encountered: