this questionから採用されている以下のコードは、テキストの折り返しのドロップダウンを防ぎ、すべてのドロップダウンの幅を設定します。光沢のあるselectInputでドロップダウンの幅をカスタマイズします
selectInput
のドロップダウンの幅をカスタマイズする方法はありますか?私はあなたの権利を理解していれば
library(shiny)
ui <- (fluidPage(
sidebarLayout(
sidebarPanel(
selectInput("userInput","Select User", c(1,2,3),
selected=1),
selectInput("LongInput", "Long Strings", c("This is a long long string that is long.",
"This is a long long string that is longer."))
),
# allows for long texts to not be wrapped, and sets width of drop-down
tags$head(
tags$style(HTML('
.selectize-input {
white-space: nowrap;
}
.selectize-dropdown {
width: 660px !important;
}'
)
)
)
)
))
server <- function(input, output, session) {}
shinyApp(ui, server)
を試してみてください? – Batanichek
確かに、または各ドロップダウンの幅をカスタマイズしたい –