Ajax data source and cancelled first draw
Ajax data source and cancelled first draw
JKay
Posts: 2Questions: 0Answers: 0
Hi,
I have noticed that when DataTables is initialised with an Ajax source and the first draw is cancelled by the fnPreDrawCallback function the oLanguage.sProcessing text is left on the screen. To remedy this I have modified the following part of the code
[code]
/* Okay to show that something is going on now */
_fnProcessingDisplay(oSettings, true);
[/code]
into this
[code]
/* Okay to show that something is going on now */
_fnProcessingDisplay(oSettings, oSettings.sAjaxSource === null);
[/code]
I was hoping you could add this fix to the next release of DataTables.
JKay
I have noticed that when DataTables is initialised with an Ajax source and the first draw is cancelled by the fnPreDrawCallback function the oLanguage.sProcessing text is left on the screen. To remedy this I have modified the following part of the code
[code]
/* Okay to show that something is going on now */
_fnProcessingDisplay(oSettings, true);
[/code]
into this
[code]
/* Okay to show that something is going on now */
_fnProcessingDisplay(oSettings, oSettings.sAjaxSource === null);
[/code]
I was hoping you could add this fix to the next release of DataTables.
JKay
This discussion has been closed.
Replies
Thanks for pointing this out. I think its a more general error that just with Ajax source set and on the first draw. Basically the processing display wouldn't be hidden when the draw was cancelled with fnPreDrawCallback . I've just committed a fix for this which you can download from the downloads page. Working example: http://live.datatables.net/imitiy/edit#source
Allan
Thanks for fixing this issue. Keep up the good work :)
JKay