jQuery DataTables - Filter column by exact match

前端 未结 9 2509
感动是毒
感动是毒 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:35

    just set the regex and smart false. and you get the exact result.

     $('#yourTableID').DataTable({ 
      search: {
         regex: false,
         smart: false
      }
     })
    

提交回复
热议问题