ajax-datatables-rails icon indicating copy to clipboard operation
ajax-datatables-rails copied to clipboard

Filter/search based on other fields than the ones used in displaying data to the table

Open alfie-max opened this issue 5 years ago • 3 comments
trafficstars

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?

alfie-max avatar Mar 16 '20 05:03 alfie-max

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.

mmustala avatar Jun 12 '20 09:06 mmustala

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.

n-rodriguez avatar Aug 07 '20 16:08 n-rodriguez

you can add hidden columns in your datatables and search/filter on it.

How make this?

rollyar avatar Apr 27 '21 00:04 rollyar