I just updated R and various packages and now the datatables are not showing up as expected. Earlier, I would see the pagination, number of total rows, and would be able to scroll horizontally as well as vertically. After the recent update, the tables are showing up but cannot see the pagination, total number of rows and cannot scroll. So, I reverted back some of the packages that I thought would be responsible i.e. flexdashboard_0.5.1.1
, htmlwidgets_1.5.1
and DT_0.13
but it is still not working as it was before I did the update. Eventually, I updated all packages to the latest versions as you would see in the sessionInfo.
Before (cannot reproduce with test data as not sure what packages and versions I was using but this is how the tables would look): even though the container allows to show only 6 rows but I was able to scroll vertically to see all 10 rows:
After updates: cannot see footer
I can only see the footer i.e. pagination, number of rows after zooming out 50%:
Here is my sessionInfo
:
R version 4.0.4 (2021-02-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] kableExtra_1.3.4 DT_0.17
loaded via a namespace (and not attached):
[1] rstudioapi_0.13 xml2_1.3.2 knitr_1.31 magrittr_2.0.1 munsell_0.5.0 rvest_0.3.6
[7] flexdashboard_0.5.2 viridisLite_0.3.0 colorspace_2.0-0 R6_2.5.0 rlang_0.4.10 stringr_1.4.0
[13] httr_1.4.2 tools_4.0.4 webshot_0.5.2 xfun_0.21 tinytex_0.29 jquerylib_0.1.3
[19] crosstalk_1.1.1 systemfonts_1.0.1 htmltools_0.5.1.1 yaml_2.2.1 digest_0.6.27 lifecycle_1.0.0
[25] sass_0.3.1 htmlwidgets_1.5.3 glue_1.4.2 evaluate_0.14 rmarkdown_2.7 stringi_1.5.3
[31] compiler_4.0.4 bslib_0.2.4 scales_1.1.1 svglite_2.0.0 jsonlite_1.7.2
Rmarkdown file test.Rmd
:
---
output:
flexdashboard::flex_dashboard:
orientation: rows
theme: cosmo
editor_options:
chunk_output_type: console
---
---
title: Test
---
```{r include=FALSE, echo=FALSE}
knitr::opts_chunk$set(comment = NA)
```
```{r load_libraries}
library(DT)
```
Tab1 (P1) {data-navmenu="Tab"}
===
Row {data-height=200}
---
### Some Information
```{r empty}
```
Row {data-height=500}
---
### Table1
```{r table1}
datatable(mtcars, rownames = F, escape = T)
```
Row {data-height=300}
---
### Table2
```{r table2}
datatable(mtcars, rownames = F, escape = T)
```
To create html output from Rmd file:
rmarkdown::render(input = 'tmp.Rmd', output_file = "tmp.html")