hyperlink - shinydashboard:如何将 menusubitem 放在超链接之外
问题描述
我正在使用 shinydashboard 并且在 dashboardSidebar 中我需要在 menusubitem 中选择一些元素。当我使用 control 或 shift 按钮在 selectInput 中选择多个元素时,将打开一个新的 chrome 页面。当我直接在 Rstudio 中尝试时,没有问题。
看起来仪表板将 menusubitem 放置在超链接中(由 Dean Attali 建议)。
我怎样才能避免这种反应?
谢谢
shinyApp(
ui = dashboardPage(skin = 'blue',
dashboardHeader(title = 'reprexes', titleWidth = 450),
dashboardSidebar(width = 350,
tags$style('.fa-table {color:#33cc33}'),
tags$style('.table2 {color:#0099ff}'),
sidebarMenu(width = 350,
menuSubItem( p(''),
icon = NULL),
menuItem('Example1', icon = icon('table'),
menuSubItem(uiOutput('col_sel'),icon = NULL)
)
) # sidebarMenu
), # dashboardSidebar
dashboardBody(
tabBox(width = '500px',
tabPanel('Instructions',
h4('Plots') ) # tabPanel
) # tabBox
)
),
server = function(input, output, session) {
output$col_sel <- renderUI({
cn <-c('New York', 'Paris', 'Pekin')
selectInput('var_1', 'Select the variables',
choices = cn,
selected = 1,
multiple=TRUE, selectize=FALSE)
})
}
)
解决方案
推荐阅读
- asp.net-core - 在单个 _Layout 中交换多个视图模型
- jquery - jquery parrend id 隐藏选择器单击按钮跨度
- xml - PowerShell:如何将 InnerText 值连接成单个字符串?
- javascript - 在复杂数组中按值搜索
- azure - NextJS 和 Azure - “您无权查看此目录或页面。”
- vim - 如何使用 oneliner 或 smth 更短地最小化当前命令?
- r - 使用 do.call 了解取消列表矩阵
- firefox - 将 Jupyter 代码单元的内容复制/粘贴到 xterm/uxterm 终端中
- javascript - 如何选择具有相同类名的按钮?
- ms-access - 如何以编程方式显示导航面板?