Processing message when sorting
Processing message when sorting
lenamtl
Posts: 265Questions: 65Answers: 1
Hi,
I have updated from 1.10 to the latest.
I'm using Bootstrap 5 and this happening in client side
How to reproduce click on column sorting icon.
On 1.10 I was not seeing the processing message (maybe only when there was a lot of data).
Now I always see processing message even when only a few result for example if I sort 6 records / client side.
This is anoying because it just flickering .
Is there a way to only display when there is a lot of data?
Thanks
Answers
Can you link to a test case showing the issue please? With only 6 rows, I wouldn't expect the processing disable to be painted by the browser.
Allan
Hi,
I cannot reproduce the case on JSFiddle with plain HTML JS.
I don't know what trigger this...
This problem was not present on 1.10
The message display even for 2 rows or on empty table when I click on sort....
I'm using PHP, I'm saving statesave to DB using Ajax.
I only change the Datatables package and I use the latest jQuery.
Can you point me in the code where it is set and the condition that displayed it.
By the way, how can I set to false using default
Because this is not working
I may disabled this message as a temporary solution.
According to the
processing
the default isfalse
. Do you haveprocessing: true
set in the Datatable init code?, If yes then this will override your setting for the defaults.Kevin
I only have **bprocessing ** for the button is it the same?
I'm not sure what
bprocessing
for the button does. I don't remember seeing this as a buttons option. If you can't post a test case showing the issue please post your relevant JS code. If you haveprocessing: false
or don't have theprocessing
configured then it will be turned off. But if you are still seeing a processing message then maybe you have custom code showing processing.Kevin
Hi,
I tought that bProcessing was for the buttons because of the b but in fact this is the old syntax for the Processing message.
See https://legacy.datatables.net/ref#bProcessing
I have replaced bProcessing by Processing and now the message is not appering all the time.
I will need to test with a lot of data to see if the message will appear in this case.
I would like to understand what are the condition that trigger the message.
Also
Should I use processing or Processing?
If I use processing = the problem persist
If I use Processing = no message
So I need to know a way to check if this is ok or not...
Take a look at the legacy options conversion guide for details. All the DT 1.10 options can be found here
Use
processing
notProcessing
.Processing
won't be found and will silently be ignored.Kevin
When I checked at https://datatables.net/reference/option/processing
I found a user comment that point to the r use into the DOM that is also trigger the
processing message
So If I understand correctly, having these 2 can cause an issue because of the r into the DOM
I'm confused
https://datatables.net/reference/option/dom
there are 2 r options on this page
one for processing and one for reorder...
So the r from this code is it for reorder or processing:
I would like to see a case where the r is use for processing...
The comment states this:
The default
dom
has thislfrtip
includingr
. The comment says that if you specify thedom
option then maybe ther
is missing in the string so it needs to be added to display the processing message.I'm assuming you are not using server side processing, ie, you don't have
serverSide: true
. Here is a 57 row table with BS 5 andprocessing: true
. The processing indicator is not seen when sorting.http://live.datatables.net/sogurodi/1/edit
Here is a similar example with 50,000 rows. The processing indicator is briefly seen - but not for 2 seconds..
http://live.datatables.net/todunoze/1/edit
There must be some process happening on your page to cause this to happen even with 2 rows. Please post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I just want to make sure does adding the r into the lfrtip is the same as
processing: true or the r is just required to display the message if true?
The
dom
option tells Datatables where to place the elements around the table. It does not enable the display of the processing element. Settingprocessing
true enables the display of the processing element. If you use thedom
option to display the buttons,B
for example,, then you also need to have
r` if you want to see the processing element.So yes both
r
andprocessing: true
need to be in place to see the processing message.Javascript is a case sensitive language. The processing option uses lower case
r
and the colReorder option uses upper caseR
. These are different.<"row"<"col-sm-12"tr>>
is lower caser
so its for processing.Kevin
Ok thanks for the infos, I will continue the tests until I find the culprit..