How to use column().search() for non-empty records?
How to use column().search() for non-empty records?
rdm
Posts: 194Questions: 55Answers: 4
I've used the code example on https://datatables.net/reference/api/columns().search()#Examples to filter a specific column by a specific string, but I've been asked to add a toggle search that filters out all column(7) records with no value. (i.e., nothing was entered in that field). How would I go about doing that "where not null or empty" column search?
This discussion has been closed.
Answers
For complex searches with multiple options, it would be worth looking at SearchPanes or SearchBuilder . Both of those are designed to cater for that. Without those, you would need to apply a regex to the search - please see example here,
Colin