Custom regex filter not working
Custom regex filter not working
KeiSenpai
Posts: 21Questions: 8Answers: 0
Hello All,
I am trying to use regex filtering to only show the exact match. However, it does not seem to be firing the event for the search.
Here is my test case:
https://jsfiddle.net/cutk2r53/6/
I feel like I must be missing something, so I do appreciate any help.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Take a look at the browser's console and you will see this error:
Your Datatables API is stored in the variable
table
. See this updated example:https://jsfiddle.net/t7nges4h/
I moved the event handler inside the
$(document).ready()
function so that it is in the same scope as thetable
variable. Also chaineddraw()
to perform the search and update the table.Kevin
Thank you again Kevin!
The only thing I notice, is clearing the filter does not show all the results.
I added this, is this the best way to solve this:
Looks like a good solution!
Kevin
Thank you Kevin!