`row.add()` throws error when attempting to add a row using an object.
`row.add()` throws error when attempting to add a row using an object.
jellisii
Posts: 10Questions: 2Answers: 0
https://codepen.io/anon/pen/GyPeqr demonstrates the problem.
I'd like to be able to populate my table with objects to ensure that the data gets populated sanely everywhere. The example at https://datatables.net/reference/api/row.add() indicates that this is completely doable. I presume I'm missing some sort of special sauce around populating the table with objects, but I'm unclear as to what it is.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You column definition should look like this:
https://codepen.io/anon/pen/jYXRbo
Take a look at
columns.data
.Kevin
Thank you @kthorngren. I knew it would be something I missed.