Filtering 3 rows via dropdown
Filtering 3 rows via dropdown

Hello,
I'm working on a new song serverside datatable that reads from mysql
I have about 8+ columns but we have 3 columns (Lead, Rhythm, Bass) that we want to filter via a dropdown.
The filter dropdown would contain the following:
Lead
Rhythm
Lead or Rhythm
Bass
My setup is currently using serverside processing so I'm not sure how to do this properly. Any help would be amazing.
Here's a demo: http://live.datatables.net/gogedeco/1/
This discussion has been closed.
Answers
What's the best way to handle the "OR" part of this at least?
With server side processing the search is performed by your server script. Are you using one of the server side examples provided by Datatables or is it your own script?
Kevin
We are using Laravel Datatables - https://yajrabox.com/docs/laravel-datatables/master but still writing everything using datatable's JS
It looks like the Laravel Datatables search documentation is here:
https://yajrabox.com/docs/laravel-datatables/master/filter-column
I suggest that if you have questions about how to perform searches with their library you ask on their support forums. With server side processing enabled the searching will process will be the Laravle Datatables library not Datatables itself.
Kevin
You can see some of our normal datatables code here:
https://ignition4development.customsforge.com/js/homeModule.js
We couldn't get $.fn.dataTable.ext.search.push( to work obviously because of server side but our other functions are working okay. Our other methods are working fine so not sure why we couldn't do something with regex to get a solution.
Like I said with server side processing enabled all the search functions are the responsibility of the server script. In your case it is the Laravel Datatables framework you are using. You will need to contact the developers of this framework for detailed help with their framework. Looks like their support area is here:
https://github.com/yajra/laravel-datatables/issues
Kevin
For more information you can read the server side processing doc:
https://datatables.net/manual/server-side
You will see in the doc that the search information for global and the columns is sent to the server. It will also send whether the search is a regex or not. The server script is responsible for understanding these parameters and responding with the correct data.
Kevin