do not redraw the table on new row insert

do not redraw the table on new row insert

mkoryakmkoryak Posts: 14Questions: 0Answers: 0
edited August 2011 in General
When using fnAddData to add a single row, the entire table gets redrawn.
i use a fixed height table with a scroll bar. when the new row is added because the entire dom is rebuilt, i get "scrolled" to the top of the table.

i am working on a table that get a lot of live row updates via websockets, so it makes for a bad UX if the table keeps scrolling to the top.

is there a way to work around this issue?

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    http://datatables.net/api#fnAddData - second parameter, just pass in as false :-). That will stop the redraw.

    Allan
This discussion has been closed.