Setting the column specific search parameters manually, when doing server-side processing
Setting the column specific search parameters manually, when doing server-side processing
iliasr
Posts: 2Questions: 1Answers: 0
Greetings,
I am trying to specify the search parameters of an AJAX request before sending it to the server, but cannot set them successfully. I am using the following code:
$('#myTable').dataTable({
//...
columns: [
//...
{
name: "ID",
searchable: true,
search: {
value: "some search term",
regex: true,
},
},
],
//...
serverSide: true,
ajax: {
url: "...",
type: "POST",
}
});
However, when I inspect the AJAX request that's being sent to the backend, I see:
columns[1][name]:ID
columns[1][searchable]:true
columns[1][orderable]:true
columns[1][search][value]:
columns[1][search][regex]:false
It's clear that these parameters are not set correctly for some reason... Is what I am trying to do actually possible?
Thanks,
Ilias
This discussion has been closed.
Answers
Apologies, missed a closing bracket right after line 11...
EDIT: Fixed, found edit afterwards :)