Ajax data source and cancelled first draw

Ajax data source and cancelled first draw

JKayJKay Posts: 2Questions: 0Answers: 0
edited February 2012 in Bug reports
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

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi JKay,

    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
  • JKayJKay Posts: 2Questions: 0Answers: 0
    Hi Allan,

    Thanks for fixing this issue. Keep up the good work :)

    JKay
This discussion has been closed.