在闪亮的应用程序中,有没有办法防止下拉列表中的文本换行selectInput(),如下面的屏幕截图所示?每个选项都是一个长文本字符串。我希望下拉菜单在一行上显示每个长字符串,而不需要制作一个巨大的侧边栏。
在下面的应用程序中,我想更改以下三个方面ActionButton:
这可以在闪亮的范围内完成吗?
library(shiny)
library(shinyBS)
ui <-
fluidPage(
fluidRow(
column(12,
bsCollapse(id="instructionsOutput", open="instructionsPanel",
bsCollapsePanel("instructionsPanel",
"This is a panel with text",
style="info"
)
)
),
column(12,
actionButton("p1Button", "Expand/Collapse Text")
)
),
sidebarLayout(
sidebarPanel(),
mainPanel()
)
)
server <- function(input, output, session) {
observeEvent(input$p1Button, ({
updateCollapse(session, "instructionsOutput",
open="instructionsPanel",
close="instructionsPanel")
})
)
}
shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)