Css 将垂直滚动条添加到shinyjs下拉按钮-闪亮
我正在使用shinyjs dropdownbutton在shinydashboard中显示单选按钮。 我需要你的帮助解决以下问题 为下拉列表添加垂直滚动条 请检查我的密码Css 将垂直滚动条添加到shinyjs下拉按钮-闪亮,css,r,shiny,shinydashboard,shinyjs,Css,R,Shiny,Shinydashboard,Shinyjs,我正在使用shinyjs dropdownbutton在shinydashboard中显示单选按钮。 我需要你的帮助解决以下问题 为下拉列表添加垂直滚动条 请检查我的密码 library(shiny) library(shinydashboard) library(shinyjs) ui <- dashboardPage(skin = "black", dashboardHeader(title = "test"),
library(shiny)
library(shinydashboard)
library(shinyjs)
ui <- dashboardPage(skin = "black",
dashboardHeader(title = "test"),
dashboardSidebar(),
dashboardBody(
fluidRow(
column(width = 1),
dropdownButton(
tags$h3("List of Input"),
radioButtons("attr_var","", c("1","2","3","4","5","6","7","8")),
circle = TRUE, status = "danger", icon = icon("gear"), width = "100px",
tooltip = tooltipOptions(title = "Click to see inputs")))))
server <- function(input, output, session) { }
shinyApp(ui, server)
库(闪亮)
图书馆(shinydashboard)
图书馆(shinyjs)
ui这是一个很晚的答案,但诀窍是在下拉按钮内设置max height
和overflow-y
值。您的代码可能如下所示:
dropdownButton(
circle = TRUE, status = "danger", icon = icon("gear"), width = "100px",
tooltip = tooltipOptions(title = "Click to see inputs")))),
div(style='max-height: 80vh; overflow-y: auto;',
tags$h3("List of Input"),
radioButtons("attr_var","", c("1","2","3","4","5","6","7","8"))))