jQuery DataTables - Filter column by exact match

前端 未结 9 2486
感动是毒
感动是毒 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条回答
  •  -上瘾入骨i
    2020-11-27 18:23

    Ok solved the problem. However, since the column I am using the exact match on sometimes contains multiple ID #s seperated by commas, I wont be able to use an exact match search.

    But for those interested, here is the answer:

    oTable.fnFilter( "^"+TERM+"$", COLUMN , true); //Term, Column #, RegExp Filter
    

提交回复
热议问题