disable smart filtering / regex filtering? Confused

disable smart filtering / regex filtering? Confused

kamrankamran Posts: 5Questions: 0Answers: 0
edited April 2012 in General
Hi Guys,

I'm using datatables 1.9 and use columnfilter for filtering my table. I have two values, "3", and "3 2" in one column.

I'm trying to disable smart filtering, and/or limit the filter result to be absolute i.e. when 3 is selected, none of the 3 2 rows show up in the results.

I feel like this should be some default option that I can disable, but after a few hours of digging, I'm totally lost. Is this possible? Any help would be appreciated.

Thanks!

Replies

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    The thing to remember is that DataTables is just effectively doing a string match - if 3 is found in the string then it matches. However its easy to get what you want using regular expressions - just use "^3$" as the string to match (for example), turning on regular expressions and off smart filtering. To do this you would need to bind a listener to the input control that will listen for keyup events and pass the value to fnFilter.

    Allan
This discussion has been closed.