Processing event, when is it fired?

Processing event, when is it fired?

Karl53Karl53 Posts: 72Questions: 29Answers: 0

The processing div I've setup, displays just fine when the table is being sorted. However, for this:

table.rows.add();

I can't get it to show. Is rows.add() not considered to be "some kind of processing"?

Any suggestions for how I can indicate to the user something is going on when adding data to the table?

Thanks.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    rows.add() isn't actually considered as "processing" - but if you trigger a draw, that will be. The add method actually does very little, all of the interesting stuff (the real "processing") happens when a draw is triggered.

    There is a legacy API plug-in that can be used to display the processing indicator. That could be updated for the 1.10 API and then you could use that.

    Allan

  • Karl53Karl53 Posts: 72Questions: 29Answers: 0

    Thanks Allan, but I'm missing something here. Are you saying draw() trigger's processing?

    table.rows.add(myData);
    table.draw();
    

    The processing event does not fire when above is executed.

    Also, if draw() triggers the processing event, why are you mentioning the legacy API plug-in to display the indicator?

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    No, you are correct - that looks like a bug :-(. Thanks for flagging it up.

    In the mean time, a processing indicator API method is probably the best way to do this.

    Allan

This discussion has been closed.