Why is column search returning values outside my specified range?
Why is column search returning values outside my specified range?
So I have a column populated with integer values between 1 and 6.
In the jquery code I have a simple statement.
contentTable.column(categoryChoice).search("[4-6]", true,false).draw();
However, it returns values from 3 to 6.
I even tried a different format.
contentTable.column(categoryChoice).search("4|5|6", true,false).draw();
It returned values from 3 to 6.
But when I did this:
contentTable.column(categoryChoice).search("[5-6]", true,false).draw();
It return what I needed: only records with values of 4, 5 or 6.
I am confused. Why is this happening to me?
This question has an accepted answers - jump to answer
Answers
Your regex search works here:
http://live.datatables.net/liculule/1/edit
Please post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I realized that the filter was being applied to the wrong column. column index number -1 strikes again.