Open greg606 opened 8 years ago
@greg606 I was searching for the exact same thing this morning because I wanted to use the aoColumnDefs option. Here's what I ended up doing in twig.
Hope this helps
{{ datatable({
'id' : id,
'js' : {
'destroy' : true,
'sAjaxSource' : path(ajaxSource),
'dom': '<"pull-right"ri><t><"pull-right"p>',
'iDisplayLength' : 15,
'bProcessing' : false,
'aoColumnDefs': [
{ targets: [0], visible: false},
{ targets: '_all', visible: true }
],
'fnPreDrawCallback': 'function( e ) {
if($("#modal-lookup-suppliers").hasClass("in")||$("#modal-lookup-customers").hasClass("in")){
$("#modal-loading").modal("show");
}
}',
'fnDrawCallback': 'function( e ) {
$("#modal-loading").modal("hide");
}'
}
}) }}
@sfauch1 Thanks, I will check it ;)
Is it possible to use more advanced options like this code:
At the moment it collides with twig.