jquery DataTables. How to get filtered (visible) rows

后端 未结 7 1455
盖世英雄少女心
盖世英雄少女心 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

    For datatables 1.9 and later this solution works:

    myDataTableHandle = $('#example1').dataTable(...);
    ...
    ...
    var myFilteredRows = myDataTableHandle._('tr', {"filter":"applied"});
    

    and you won't have to include a separate api plugin. :)

提交回复
热议问题