DT::datatable display

30 views
Skip to first unread message

ShinyIsCool

unread,
Feb 25, 2015, 4:10:11 PM2/25/15
to shiny-...@googlegroups.com
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.]

ShinyIsCool

unread,
Feb 25, 2015, 7:17:31 PM2/25/15
to shiny-...@googlegroups.com
I posted this on SO -- http://stackoverflow.com/questions/28730255/dtdatatable-display/28732172
Looks like this is a bug.  A workaround has kindly been posted there.
Reply all
Reply to author
Forward
0 new messages