2

ShinyBS のダイナミック ポップオーバーは、2 番目の選択ごとにのみ表示されます。

library(shiny)
library(shinyBS)

ui <- fluidPage(
   sidebarLayout(
      sidebarPanel(
        selectInput("poppy", "Think!", c("A", "B", "C", "D")),
        bsButton("dummy", "dummy")), ## required, dummy
      mainPanel(
        helpText("Note that when you select from the box, popover turns up every second time only!")
)))

server <- function(input, output, session) {
   observe({
     poppy = paste("You selected ", input$poppy)
     addPopover(session, "poppy", "Every second time", poppy)
})}

shinyApp(ui = ui, server = server)
4

2 に答える 2