Setting data() results in a draw() - v1.10
Setting data() results in a draw() - v1.10
billm
Posts: 3Questions: 1Answers: 0
The API reference states that when data() is "used as a setter, this method sets the data to apply to the table, but does not visually update the tables display to account for this new data. In order to have the table's display updated, use the draw()DT method."
However, when I set data without calling draw() the table draws anyway?
Anyone else noticed this? Is it a bug or am I doing something wrong? I want to set data but I don't want to update the view until later.
This discussion has been closed.
Answers
This is for v1.10
I think I need to clarify the documentation there - the HTML will be updated (i.e. the
innerHTML
content is written to immediately, thus the appearance is updated - however, the sorting and filtering applied to the table is not updated untildraw()
is called.Allan
Documentation will now say:
I've not deployed the change yet - but will soon!
Thanks for flagging this up.
Allan
No problem. Thanks for the clarification!
Bill