Tables with DT::datatable() are not rendering correctly in pkgdown.

  • The table from the top example renders OK as an Rmarkdown > HTML, so I’m thinking that the issue has something to do with the container layout used in pkgdown.

Here’s a bunch of different things I’ve tried.

DT

Currently DT tables fill the entire container, but the internal columns do not.

DT - filter

Adding filter fixes the column width issue. Would be nice if columns widths were fixed without this.

Issue filed at https://github.com/rstudio/DT/issues/563.

Hint from from https://saurfang.github.io/pkgdown.example/reference/datatable.html

datatable(iris, filter = 'top')