There is any way to set a default search value for a column in start definition?
As define a default order or default search
$('#table').dataTable({
ajax: {url: '...'},
order: [['0', 'asc']],
search: { search: '...' },
columns: [
{ data: "id" },
{ data: "name" },
{ data: "description" }
]
});
For column "name", I've tried
{ data: "name", search: "initial search" }
{ data: "name", search: { search: "initial search" } }
{ data: "name", search: { value: "initial search" } }
but none worked!
Any suggestions?
Try "searchCols": for "search" as stated in the API for DT https://datatables.net/reference/option/searchCols
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With