jQuery DataTables - Filter column by exact match

前端 未结 9 2513
感动是毒
感动是毒 2020-11-27 18:06

Trying to only display exact matches to the search term entered in the search bar.

For instance, I have a search bar that filters by ID#. I want only records that m

9条回答
  •  时光说笑
    2020-11-27 18:45

    This will give you exact result for a column.

     table.column(i)
     .search("^" + $(this).val() + "$", true, false, true)
     .draw();
    

    ie . search( input , regex, smart , caseInsen )

提交回复
热议问题