Closed sainani8897 closed 2 years ago
Datatables.net is a jQuery component; as such, you have to modify request it before it is sent. This is similar to sending additional headers here: https://github.com/niiknow/vue-datatables-net#additional-headers
// generic jquery example
beforeSend: function(jqXHR, settings) {
settings.data = $.extend(settings.data, {anotherParamter: 'test'});
return true;
}
// if sent as query string
beforeSend: function(jqXHR){
this.data += '&' + $.param({
anotherParamter: 'test'
});
}
A little more research and you can find it from the source. Here's the documentation: https://datatables.net/examples/server_side/custom_vars.html Example: https://datatables.net/forums/discussion/23262/load-ajax-data-with-custom-parameters
Stale issue.
I want to send custom query params to data but anyhow it always sends params that were initialised earlier i wasn't able to update the parameters any help?