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

can't filter on form elements #50

Closed
aquamoth opened this issue Sep 13, 2016 · 1 comment
Closed

can't filter on form elements #50

aquamoth opened this issue Sep 13, 2016 · 1 comment

Comments

@aquamoth
Copy link

I have used filterTable for quite some time and love it.
However, now I have a long table full of textboxes, selects and textareas.
Those elements does not seem to be part of the filtering rules.

Do you have any tips on how to tweak the component to see inside those elements too?

@sunnywalker
Copy link
Owner

The filtering calls .text() from jQuery to filter out tags to prevent the tag name and parameters from showing up in the search (e.g., searching on “put“ would catch all <input> tags). You could probably easily modify the $.expr[':'].filterTableFind and $.expr[':'].filterTableFindAny pseudo selectors to return $(el).find('input,textarea').val()… instead of $(el).text()… as long as all your table cells only have either an input or textarea. But if you have some td with inputs/textareas and some with just text, you'd need a more robust function to figure out how to search both or each. That's a pretty messy solution but the only one I can think of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants