JQuery datatable how to do search multiple value within single column using OR logic

前端 未结 2 666
暗喜
暗喜 2020-12-17 17:27

for example, there is a column index of 7 about Source. I want to filter out all Source from A or B to be my result by typing A,B in the search input box. the format A,B is

相关标签:
2条回答
  • 2020-12-17 18:04

    Use regexp: https://datatables.net/forums/discussion/6946/multiple-filters-on-same-column

    Go to: http://www.datatables.net/release-datatables/examples/api/regex.html

    • In column: Column - Office
    • Put: tokyo|london
    • And check: Treat as regex
    0 讨论(0)
  • 2020-12-17 18:20

    100% Working Multiple value search single column

    var oTable = $('#intrestTable1').DataTable( {});
    oTable.column(5).search("caod|bullet",true,false).draw();
    
    0 讨论(0)
提交回复
热议问题