How to connect to datatable event listener

How to connect to datatable event listener

Jeremyh233Jeremyh233 Posts: 1Questions: 1Answers: 0
edited August 2016 in Free community support

I'm currently using react.js with Datatable. When I take the json information back from an ajax call and and reinitialize the datatable on it, the information is displayed, however, I don't believe it is actually properly registered in the datatable as the number of entries at the bottom of the table does not include the new row. The row would be included if I refresh the page when I reinitialize the table.

The issue I believe is that the event listener did not pick up the new row. So, my question is how would I properly be able to add the new row? I've browse the forum and google and have tried multiple methods which none seemed to work so far.

As shown above in the image, even though 3 rows were loaded, the table only registered the two from the initialization.

Answers

  • allanallan Posts: 63,122Questions: 1Answers: 10,397 Site admin
    edited August 2016

    how would I properly be able to add the new row?

    row.add() and rows.add() is how to add new row(s) to an existing DataTable.

    Allan

This discussion has been closed.