Closed Dr-Ash closed 5 years ago
Hello there!
I want to search by a single column in my datatable programatically via js. this is a snippet of my code :
`$('#dt').initDataTables({{ datatable_settings(datatable) }}, {
responsive: true, searching: true, stateSave: true, "bFilter": true, } ) .then(function (dt) { dt.on('init', function () { $('#select-filter').on('change', function (e) { if ($(this).val() == -1) dt.search('').draw(); else { dt.columns(0).search('lol').draw(); } }); }); });`
if i search globally it works fine, but when i search on specific column nothing happens. i also added 'searchable' => true to my TableType columns.
'searchable' => true
Hello @Dr-Ash, forgive my ignorance but why was this issue closed. I am currently facing this issue and would not want to create another issue thread?
Hello there!
I want to search by a single column in my datatable programatically via js. this is a snippet of my code :
if i search globally it works fine, but when i search on specific column nothing happens. i also added
'searchable' => true
to my TableType columns.