ajax-datatables-rails
ajax-datatables-rails copied to clipboard
Filter/search based on other fields than the ones used in displaying data to the table
my concern is that, the gem assumes that search should only be done on the columns which are displaying on the table.. how can i skip the entire view_columns and write my own custom queries for searches?
With table.ajax.url() you can set the ajax url to what ever you want. For example you can append some additional query strings from input fields outside datatables when the values in the input fields have changed. Then just reload the table and use those query parameters in the backend.
my concern is that, the gem assumes that search should only be done on the columns which are displaying on the table.
you can add hidden columns in your datatables and search/filter on it.
you can add hidden columns in your datatables and search/filter on it.
How make this?