I am using KtDatatable for my datatable i have problem when I want to reload my table with new parameters. Usually in regular datatable we used this
'data': function(d) {
d.date_range = getDaterange();
d.payment_status = getPaymentStatus();
}
but in KTDatatable I cant used that, so i used this
params: {
query: {
generalSearch: 'tes',
date_range: getDaterange()
},
},
The problem is when I call
datatable.reload()
in KTDatatable, it wont get my new parameters with getDaterange() function
I also use this like in regular datatable
datatable.api().ajax.reload();
But it show error .api is not function. How can i send new parameters to my api when reload the datatable ? Thankyou
this will only send the initial value of getDaterange()
try this code