combining filters
combining filters
Hello,
I'm having trouble understanding the filtering mechanism.
My goal is to apply an optional, persistent filter in addition to DataTables' default search:
[code]
[ search ]
| Name | Primary Color | Secondary Colors | ... |
| ... | blue | red, white | ... |
| ... | yellow | | ... |
| ... | black | purple | ... |
| ... | green | red, blue, yellow | ... |
color:
[ ] red [ ] green [ ] blue [ ] ...
[/code]
If the user selects any of the color checkboxes at the bottom, a column-agnostic filter should be applied permanently in addition to whatever is entered in the search field.
I can do the filtering by calling fnFilter - but then using the default search field afterwards effectively removes that filter.
I suppose the correct solution is to add a function to afnFiltering - but I'm not sure how to filter values across columns without effectively reinventing fnFilter.
Any tips would be appreciated!
I'm having trouble understanding the filtering mechanism.
My goal is to apply an optional, persistent filter in addition to DataTables' default search:
[code]
[ search ]
| Name | Primary Color | Secondary Colors | ... |
| ... | blue | red, white | ... |
| ... | yellow | | ... |
| ... | black | purple | ... |
| ... | green | red, blue, yellow | ... |
color:
[ ] red [ ] green [ ] blue [ ] ...
[/code]
If the user selects any of the color checkboxes at the bottom, a column-agnostic filter should be applied permanently in addition to whatever is entered in the search field.
I can do the filtering by calling fnFilter - but then using the default search field afterwards effectively removes that filter.
I suppose the correct solution is to add a function to afnFiltering - but I'm not sure how to filter values across columns without effectively reinventing fnFilter.
Any tips would be appreciated!
This discussion has been closed.
Replies
Thanks!