Feature Request: row.data() to accept nodes
Feature Request: row.data() to accept nodes
Hello,
Some of my table rows contain fairly complex HTML, to the point that I'm finding it easier to generate it server side and pass it to the client as they're needed for inserts/update, rather than do the generate the new row client side.
When adding a new row this is fine, I simply do table.row().add($(complexRowAsAVar))
which is great.
The trouble comes when I need to update a row, as table.row(myRow).data()
only accepts objects or arrays.
What would be great is that if I supply row().data()
with a node then it knows to completely replace that rows HTML with the new HTML supplied.
Has anyone else had to do something similar to this before?
Would this be overly difficult to add to DataTables as a feature?
Thanks,
Dan
This question has an accepted answers - jump to answer
Answers
Just as an additional piece of information, I found this thread which offers a work around, but as Allan points out you end up with a row that has a different unique identifier, whereas it might be beneficial to have a way of keeping that the same.
Thanks,
Dan
It probably wouldn't be too difficult to allow
row().data()
to accept atr
element to be honest. I'll look at that in a future version, but it isn't something that I'll put into 1.10.x I'm afraid (that's going into maintenance / fix mode).Allan