processing indicator not showing
processing indicator not showing

I'm using datatables 1.10.18 with MDBootstrap 4.8.4 and can't get the processing indicator to show.
I have a search operation that takes about a second or two and I expected to see the processing indicator.
The relevant DataTable() options are:
dom: "fr<'ExportButton'B>ti",
processing: true
language: {
processing: '<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>Processing...'
},
Things I've tried include moving the 'r' in the dom spec to different locations, changing the processing message to simple text, setting it to
Processing
and several other combinations and lots of unsuccessful googling.
Is there maybe some CSS I need to adjust?
I'm stumped. Any help would be greatly appreciated!
Answers
Just tried it myself with your code and it worked fine both in the German and English version. Thanks for this!
This is my code based on your example:
The processing indicator is shown while initially loading the data table. I am not sure whether it will ever be shown while conducting a search operation though! @Colin, can you give us a hint please.
Made it a little nicer so that the text is centered vertically with the fa spinner:
Found this here: https://editor.datatables.net/reference/event/processing
If you do your search client side (the default) and don't use server side processing you are not going to see a processing indicator. This might be the reason for your issue.
Update: Just tried this on one of my server side search pages: No processing indicator even though the search string gets submitted to the server ...
@colin, @allan,
why is the processing inidcator not showing even with server side search? Is it only showing upon loading the data table?
Use
processing
. The link you gave above was to the Editor processing option.If that doesn't resolve it for you, please link to the page so I can take a look.
Thanks,
Allan
No this is not about the Editor processing option which I use as well when uploading documents. But I made a mistake: In the respective server side search page I had overwritten my $.fn.dataTable.defaults ("processing: true") with "processing: false".
Turned it back on and it also worked for server side search, not only the loading of the data table.
Of course it doesn't work for client side search. So if that was @kennovation 's problem then there is not solution for this, I guess.
@allan, now I see what you mean: I got the wrong link from the docs. So your link is right.
Just tested with a large table client side: Processing indicator went on when ordering the table. It didn't go on when searching - probably because the search was still very fast in spite of the high number of records.
Is there a threshold in terms of milliseconds when the indicator is shown?
No - with client-side processing the search is actually performed synchronously so there is no processing indicator. For the sort it is async if the user clicks to sort. It is synchronous for the
order()
method!With server-side processing it is always async for every action so it will always appear.
It might be possible to move some of the processing such as search into a web worker, but that's not currently on our roadmap.
Allan
Wow! Many thanks, Allan.
When I started coding there was no difference between client and server. Just dumb terminals ...
Why was this abandoned? The main reason was bandwidth limitations. These will soon be resolved. Looking forward to the abolition of the client server paradigm ...