-
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
Select2 filter seems to be broken #1497
Comments
Hi @robinbrisa! Thanks for reporting this problem! |
The issue seems to be if the selection contains 2 words instead of 1 ( See AlphaNumeric (exact; only available) in the demo), it filters but the selection does not show in the search box. In the first column, AlphaNumeric (match), choose "abc" and it shows in the select2 input, select "abc 1" in the second column and it is not displayed but the filter still works. |
@Mottie Hello, we still have the same problem. Thanks for your help ! |
Hi @FlorianChretien! Please elaborate on the issue you're having. A demo showing the problem would be appreciated. |
As said above, if there is a space between words, nothing is displayed. We can also see it in the demo (2nd column) : https://mottie.github.io/tablesorter/docs/example-widget-filter-formatter-select2.html |
Ahh, ok... I'll look into this on the weekend. |
Thanks :D |
I commented in the Slack, but I'll put it here so other's can find it. The issue resides on line 68 here https://github.com/Mottie/tablesorter/blob/master/js/widgets/widget-filter-formatter-select2.js. If you remove the \s from the regex, the selected options with a space will work. For example, I have a table that lists computer names, organizational units, and some other details about a computer. The computer names have a '-' in them, and OUs have a /, both were being picked up by the regex mentioned and prevented them from visually being selected. Hope this helps! |
Thanks @sthkn! Maybe adding an option for this regexp would be the best solution. |
Sorry for the super-long delay! Version 2.31.2 is now available. |
The select2 filter is broken. Selected values are not being filtered.
The bug is even there on the demo : https://mottie.github.io/tablesorter/docs/example-widget-filter-formatter-select2.html
The text was updated successfully, but these errors were encountered: