1

I am developing shiny app and I would like to use shinyBS. But the shinyBS is not compatible with new shiny v1.0.5, entire screen gray, including modal.

I would like to plot on bsModal window.

Is there a alternative way for shinyBS?

Any idea ?

Many thanks.

Here is the code:

library(shiny)
library(shinyBS)

shinyApp(
ui =
fluidPage(
  sidebarLayout(
    sidebarPanel(numericInput("n", "n", 50),actionButton("go", "Go")),
    mainPanel(
      bsModal("modalExample", "Your plot", "go", size = "large",plotOutput("plot"),downloadButton('downloadPlot', 'Download'))
    )
  )
),
server =
function(input, output, session) {

  randomVals <- eventReactive(input$go, {
    runif(input$n)
  })

  plotInput <- function(){hist(randomVals())}

  output$plot <- renderPlot({
    hist(randomVals())
  })

  output$downloadPlot <- downloadHandler(
    filename = "Shinyplot.png",
    content = function(file) {
      png(file)
      plotInput()
      dev.off()
    }) 

}
)
zx8754
  • 52,746
  • 12
  • 114
  • 209
alan pter
  • 41
  • 3
  • 11
  • I Think you rather have problem with your code than that shinyBS is incompatible with Shiny 1.0.5 – Bertil Baron Nov 18 '17 at 11:43
  • Thanks Bertil. I have added code to my post above. It is still doesnt work in new shiny 1.0.5. – alan pter Nov 18 '17 at 14:39
  • Hi Alan, your code works perfect on my computer. Which version of shinyBS are you using? My versions are: R: 3.3.3 Shiny: 1.0.5 shinyBS: 0.61 – Bertil Baron Nov 19 '17 at 11:56
  • Can confirm the above code doesn't work for Windows 10, R 3.5.0, Shiny 1.1.0, shinyBS 0.61, but for some reason works fine on Ubuntu 16.04 with the same package versions. See https://github.com/ebailey78/shinyBS/issues/95 for a bugreport – Gerhard Burger Jun 11 '18 at 11:18

0 Answers0