Allow "loading" to be turned on/off in the API

Allow "loading" to be turned on/off in the API

mnlippmnlipp Posts: 2Questions: 0Answers: 0

I'm not using AJAX, rather my data is pushed into the table by a message received from a web socket. Therefore, I cannot make use of the "loading" state (and message) of datatables. My table is created, showing "No data available in table" until the data has arrived, is processed and inserted into the table.

My understanding is that if i were to use AJAX, the table would display "Loading data ..." until the data has arrived and is processed and inserted. Of course, this would also be much nicer in my use case. I could, however, not find a way to control the message display in the not-yet-filled table. It would be nice if the "loading" state could be controlled with the API, allowing me to create the table with "Loading..." being displayed and turning that off once the data has arrived.

Replies

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    You could use the processing plug-in to show a processing message (which you could easily change to say "Loading..." with the i18n options).

    Allan

  • mnlippmnlipp Posts: 2Questions: 0Answers: 0

    Okay, thanks a lot. This was hidden too deep in the documentation. (Maybe because I didn't expect this to be a plugin-in, seemed like a "core task" to me.)

This discussion has been closed.