-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No regex search? #11
Comments
It is using 2 different search providers if you will. Most of the examples on datatables.net are all doing client side searching. The entire table has been loaded through a JS array or from the DOM. This script is for chunking the table data through Ajax so that it goes back and requests data from the DB on the server for every search, sort, and page. The default search for the datatables.net is a anywhere match. The default search for this library is a left to right partial match. This type of matching is faster than searching anywhere in the string. However, you can still setup the library to have the same functionality by doing one of the following:
setColumnSearchType(columnName, type) Set the matching type to be done for a given column. This will default to "after" if not specified columnName(string) - Name of the column matching what was passed in from the JavaScript in the data property type(string) - Type of search to perform. This will control the % wildcard on the like. valid values are: before, after, both, none
There is not a method that turns on the column search type for the entire table. That would be a good one to add and I have made a note to add it to the library. |
Hi Zepernick, I'm having the same issue as well, I've tried with the setColumnSearchType method already with 'both' set to all my columns with no result. So in library\Datatable.php , line 408:
For this workaround, I changed to :
I'm not sure this is the best way to do it, but you might have a different suggestion / solution to this ? |
Hey,
if I type on your example site/contact search "Doro", it will show me "Dorothy Young".
If I type "Youn" I can't find anything.
When I do the same on datatables.net examples, this kind of search works.
Why is it like this?
The text was updated successfully, but these errors were encountered: