jQuery.FilterTable icon indicating copy to clipboard operation
jQuery.FilterTable copied to clipboard

Display row "No search results found" if search row is zero

Open carlduazo opened this issue 8 years ago • 1 comments

I want to display a colspan row with "No search result found" message if search results is zero. Are there any options?

carlduazo avatar Dec 08 '16 04:12 carlduazo

An option would be nice.

my ~~not gorgeous~~ workaround, using default options

HTML: <div id="no-result" style="display: none;">No results :(</div>

JS:

$('table').filterTable({
    callback: function( term, table ){
        var display = $(table).find('tbody tr.visible').length === 0 ? true : false;
        $("#no-result").toggle(display);
        $(table).toggle(!display);
    }
});

wafgomes avatar Oct 18 '17 15:10 wafgomes