omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
262 stars 114 forks source link

Search through datatable API not working #135

Closed tristan-lg closed 4 years ago

tristan-lg commented 4 years ago

Hello I want to add per-column search field. As i know, the support from the bundle isn't yet implemented, so i choosed the api way from datatable to make this possible. But when i do column(...).search('test').draw(), the table is refreshed but nothing happends. I analyzed the query, and nothing is set for the column[search][value] field.

My code client-side (inspired by datatable example)

dataTableContainer.initDataTables(bundleSettings).then(function(dataTable) { dataTable.columns().every(function () { var that = this; $('input', this.footer()).on('keyup change clear', function () { if (that.search() !== this.value) { that.search(this.value).draw() } }); });});

I guess it's related to an option or something like this, but i can't figure out. Can you help ?

I think it's related to #85