I’m trying to initialize a Datatable with a default search value that the user can either replace or refine on. This is with server-side data. I haven’t read anything where you can do this in the Datatables documentation.
$('#example_filter label input[type=text]').val('Default Product')
The above sets the value but because there isn’t a keypress involved the event handler doesn’t pick it up. Is there a method I can chain onto the above that would act like the enter key, or should I write an event handler that looks for changes in the field. I’m pretty new to datatables and a jQuery novice.
So the proper way of doing this is using the oSearch parameter.
https://datatables.net/docs/DataTables/1.9.0/DataTable.defaults.oSearch.html