Hello -- in the following code, the column names disappear when the line "container=..." is uncommented.
require(DT)
DT::datatable(iris[1:5,c(1,2)]
#, container=htmltools::tags$table(class="display")
)
Looking at the Page Source in the browser
Line 22 (container commented)
"container": "<table>\n <thead>\n <tr>\n <th>Sepal.Length</th>\n <th>Sepal.Width</th>\n </tr>\n </thead>\n</table>",
Line 22 (container not commented)
"container": "<table class=\"display\"></table>",
Any idea how they can both be made to work?
[Sorry for the duplicate post. I realized that a much simpler example can be used to show the problem.]