processing
Processing event - fired when DataTables is processing data.
Description
This event is fired when DataTables is doing some kind of processing - be it, sorting, filtering or any other kind of data processing. It can be used to indicate to the end user that there is something happening, or that something has finished.
Note that this event is used by DataTables' processing display option, and can be useful if you want to replace the DataTables built-in processing indicator with a custom indicator - one which is used in other parts of your application for example.
Please note that, as with all DataTables emitted events, the event object has a DataTables API instance available on it in the dt property.
Type
function( e, settings, processing )
Parameters:
| Name | Type | Optional | |
|---|---|---|---|
| 1 | e | No | |
Event object | |||
| 2 | settings | No | |
DataTables settings object | |||
| 3 | processing | No | |
Processing flag: | |||
Example
Show / hide notification of table processing (where #example is the DataTable):
new DataTable('#myTable', {
on: {
processing: (e, settings, processing) => {
document.querySelector('#processingIndicator').style.display =
processing ? 'block' : 'none';
}
}
});Related
The following options are directly related and may also be useful in your application development.