我shinyBS::bsModal()
习惯在那里放置 UI 元素的解释。当我bsButton()
在复选框的标题后面放置一个时效果很好。
现在我想把它放在复选框选项后面。第一个提示可能是这个答案,其中对工具提示完成了相同的操作(但我的修改不起作用)。
最小的例子:
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)