jbox-web / ajax-datatables-rails

A wrapper around DataTable's ajax methods that allow synchronization with server-side pagination in a Rails app
MIT License
585 stars 228 forks source link

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

Open alfie-max opened 4 years ago

alfie-max commented 4 years ago

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?

mmustala commented 4 years ago

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.

n-rodriguez commented 4 years ago

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.

rollyar commented 3 years ago

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

How make this?