【发布时间】:2017-12-16 13:47:05
【问题描述】:
使用dashboardPage,我用盒子制作了一个仪表板。
我希望能够单击框标题上的某处来触发某些操作。我知道标题有按钮的唯一情况是可扩展框的情况。是否可以概括一下,以便在单击框标题中的某处时触发某些操作?
我的设计目标是在用户单击此按钮时更新框中的信息,即更改框的内容。
谢谢!
body <- dashboardBody(
fluidRow(
box(
title = "Title 1", width = 4, solidHeader = TRUE, status = "primary",
"Box content"
),
box(
title = "Title 1", width = 4, solidHeader = TRUE, status = "warning",
"Box content"
)
)
)
# We'll save it in a variable `ui` so that we can preview it in the console
ui <- dashboardPage(
dashboardHeader(title = "Row layout"),
dashboardSidebar(),
body
)
# Preview the UI in the console
shinyApp(ui = ui, server = function(input, output) { })
【问题讨论】:
-
看看this 尤其是后面的部分:“Edit: Whole infoBox clickable”
标签: javascript css r shiny shinydashboard