DOM init, but then using data() to set data from an array

DOM init, but then using data() to set data from an array

thenonthenon Posts: 3Questions: 1Answers: 0

This question is general, and no error messages, so asking it without test cases and so on.

For certain reasons of reusability, I'd like to be able to define the table in html, with certain columns. And an empty tbody.

But then init a datatable, and set the its data to be an array.

When I do the second step, by calling table.data(my_array), despite the array having many items, the table does not change - no rows.

So this question is a sense check that there is nothing inherently wrong with this approach.

With many thanks!

Answers

Sign In or Register to comment.