Open kkrismer opened 4 years ago
Duplicate of https://github.com/rstudio/shiny/issues/2653.
I have not this problem with htmltools_0.4.0 at home, but I've seen this strange thing at work with a source not by me, and I think I tried to workaround this issue with success by adding DT::datatable
.
edit 2: I reproduce the issue now with unloading DT !!
In other words:
output$out1<- DT::renderDataTable(DT::datatable(my_dataframe()
, like I've seen in many articles especially from RStudio.output$out1<- renderDataTable(my_dataframe()
(The DT::
was not in initial source) by output$out1<- DT::renderDataTable(DT::datatable(my_dataframe()
. And DT::dataTableOutput()
in ui.R.But I cannot reproduce at home, and at work I'm not sure at 100% this was this issue, because when the strange issue was solved, I passed to other thing and continue to make changes.
edit 1:
Like @cpsievert said in rstudio/shiny#2653, the DT::
was not in initial source.
edit 2: I reproduce the issue now with unloading DT !!
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_1.4.0
loaded via a namespace (and not attached):
[1] compiler_3.4.4 fastmap_1.0.1 magrittr_1.5 R6_2.4.0 promises_1.1.0 later_0.8.0 htmltools_0.4.0 tools_3.4.4
[9] Rcpp_1.0.1 jsonlite_1.6 digest_0.6.18 xtable_1.8-4 httpuv_1.5.2 mime_0.6 rlang_0.4.0
@nteetor said in rstudio/shiny#2676
can you open your browser's console to see if there are any errors ?
I have many warnings in less/css. But not in js.
This should be fixed in the development version of Shiny, which you can install with:
devtools::install_github("rstudio/shiny")
But it would be better to use DT::renderDataTable
and DT::dataTableOutput
, since the DT package has more features.
This should be fixed in the development version of Shiny, which you can install with:
devtools::install_github("rstudio/shiny")
But it would be better to use
DT::renderDataTable
andDT::dataTableOutput
, since the DT package has more features.
I have tested this on my package and note that the renderDataTable issues persist with 0.4.0.9001, exactly as mentioned, with the one character columns exactly as described. installing version 1.3.2 of shiny and version 0.3.6 fixes the problem. After doing some extensive debugging, I realize this is happening within the renderDataTable function. It must have to do with some change between 0.3.6 and 0.4.0 in htmltools. Is there any knowledge of which function in htmltools is likely causing this? Perhaps I can do some investigative work here.
Dear htmltools developers,
it seems that v0.4.0 doesn't play nicely with the renderDataTable function from shiny / DT.
Specifically, htmltools 0.4.0 causes character columns of DT tables in shiny apps to be rendered incorrectly (i.e., only the first character is shown per row and column). Numeric columns are not affected.
Minimal working example:
This example code properly displays the DT table with htmltools 0.3.6, but not with htmltools 0.4.0. Tested on Windows 10 and Ubuntu 16.04.6, both running R 3.6.1.
Cheers, Konstantin