3
我使用shinyBS::bsModal()
來說明UI元素的解釋。當我將bsButton()
放在複選框的標題後面時,它很好用。在複選框組內的shinyBS Modal
現在我想把它放在複選框選項後面。 第一個提示可能是this answer,其中工具提示也一樣(但我的修改不起作用)。
小例子:
library(shiny)
library(shinyBS)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
checkboxGroupInput("qualdim",
tags$span("Chekboxoptions",
bsButton("modalbt", "?", style = "inverse", size = "extra-small")),
c("Option_1" = "Option_1",
"Option_2" = "Option_2"))
),
mainPanel(
bsModal("modalExample", "Modal", "modalbt", size = "large",
verbatimTextOutput("helptext")))
)
)
server <- function(input, output) {
output$helptext <- renderText({"I can trigger a shinyBS::bsModal() from here, but I want to place two buttons behind `Option_1` and `Option_2`" })
}
shinyApp(ui = ui, server = server)