【问题标题】:Enable/disable not working with flexdashboard+shinyjs启用/禁用不使用 flexdashboard+shinyjs
【发布时间】:2020-01-24 04:00:57
【问题描述】:

我知道this issue 并且它显然已经解决了,但我仔细检查了我是否有相关软件包的最新版本,disabledisabled 似乎都没有工作。

小例子:

---
title: "test"
runtime: shiny
output: 
  flexdashboard::flex_dashboard

---

```{r global, include=FALSE}

library(shiny)
library(shinyjs)
library(flexdashboard)
```

```{r}
print(sessionInfo())

disabled(checkboxGroupInput("a", label = "heck", choices = 1:3))
disable(id = "a")
```

会话信息:

R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252 
[2] LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] flexdashboard_0.5.1.1 shinyjs_1.0           shiny_1.3.2          

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2      digest_0.6.21   later_0.8.0     mime_0.7       
 [5] R6_2.4.0        jsonlite_1.6    xtable_1.8-4    magrittr_1.5   
 [9] evaluate_0.14   stringi_1.4.3   promises_1.0.1  rmarkdown_1.15 
[13] tools_3.6.0     stringr_1.4.0   httpuv_1.5.2    xfun_0.9       
[17] yaml_2.2.0      compiler_3.6.0  htmltools_0.3.6 knitr_1.25     

【问题讨论】:

    标签: r shiny flexdashboard shinyjs


    【解决方案1】:

    有人发布并删除了评论说我需要使用shinyjs::useShinyjs(),这非常正确,但准确地说,它必须是useShinyjs(rmd = TRUE)。如果 OP 看到这一点,请随时发布作为答案,以便您获得适当的信任。

    【讨论】:

      猜你喜欢
      • 2021-01-27
      • 2019-11-14
      • 2018-10-04
      • 2017-03-03
      • 2016-04-16
      • 1970-01-01
      • 2021-08-28
      • 2021-06-19
      • 2020-06-30
      相关资源
      最近更新 更多