Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

Have Filter return no rows when filter string is empty

$
0
0
Hi,

I'm trying to modify the Filtering so that no rows are shown whenever the filter string is empty. So, basically I want to invert the default behavior of showing all rows when the filter string is empty. With that, the "Filter" (reducing the set) behaves more like a "Search" (increasing the number of visible rows).

I can "fake" this for the initial loading of the table, by just using "fnFilter()" with a filter string that is not in the table, as in this example:
http://live.datatables.net/aticux/
However, this obviously only works as long as no search string was entered. Once that is manually is removed (so that the text field is empty), all rows are shown again.

Does anybody have ideas on how to achieve this?

Thanks!
Tobias

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>