Hi,
I'm manually setting some data with ajax:data it works if trigger .draw() using column filtering :
dtTableAPI.columns("e.etat:name").search(val_etat);
dtTableAPI.draw();
but it don't work when I try do .draw or ajax.reload in the initComplete.
With console.log I saw :
ajax.data.function is called but dateDebut and dateFin are null
initComplete is called but neither .draw or .ajax.reload() is triggering ajax.data.function
do I miss somehing ?
table.dataTable({
ajax: {
url: myurl
data: function (d) {
d.dateDebut = dateDebut;
d.dateFin = dateFin;
}
}
...
initComplete: function (settings, json) {
dtTableAPI = $("#table").DataTable();
dateDebut = "01/01/2016";
dateFin = "31/01/2016";
dtTableAPI.draw();
dtTableAPI.ajax.reload();
}
...
I hope my explanations are clear enough.
ps : The code is working (don't mind if there is typo or whatever, I summarized it).