how to know if reload is ended
how to know if reload is ended
hello
I do set filter selector on initcomplete.
After ajax.reload, selectors are empty...
How to get the ajax reload complete ?
what event is triggeed when reload ended?
In the example, select is empty because evaluated before reload end
tblOpe.on( 'select', function (e) {
tblLot.ajax.reload();
tblDoc.ajax.reload();
tblLot.columns(<?php echo $FilterLotColumnList; ?>).every( function () {
var column = this;
var select = $('<select><option value=""></option></select>')
.appendTo( $(column.footer()).empty() )
.on( 'change', function () {
var val = $.fn.dataTable.util.escapeRegex($(this).val());
column
.search( val ? '^'+val+'$' : '', true, false )
.draw();
} );
column.data().unique().sort().each( function ( d, j ) {
(d!=null) ? select.append( '<option value="'+d+'">'+d+'</option>' ):'';
});
});
} );
This discussion has been closed.
Replies
You need to wait for the Ajax reload to complete - that can be done by passing a callback as the first parameter to
ajax.reload()
- e.g.:Allan
Thanks again
hi @allan
Can't accept your answer as good.... no button to do this (accept answer)
Thanks