jquery DataTables. How to get filtered (visible) rows

后端 未结 7 1367
盖世英雄少女心
盖世英雄少女心 2021-02-07 02:28

I have a button that apply filter to jquery datatable

$(\"#buttonFilter\").button().click(function() {
                if (lboxColor.val() != null) {
                    


        
7条回答
  •  面向向阳花
    2021-02-07 03:11

    I've been searching for about an hour, for anyone using DataTables 1.10+ if you want to get the filtered (better term: "searched") rows:

    var table = $('.table').DataTable({...});
    
    function selectOnlyFiltered(){
       var filteredRows = table.rows({filter: 'applied'});
    }
    

提交回复
热议问题