Closed thothal closed 3 years ago
Standard shiny behaviour is not to show output elements when they are hidden. However, currently they are not shown even when changing the tab.
shiny
We have to trigger a shown event to let shiny know that these elements are now active.
shown
I will commit a PR with these changes. Furthermore, I propose to change bulmaTabs and bulmaTab such that we avoid to hardcode the labels twice.
bulmaTabs
bulmaTab
labels
library(shiny) library(shinybulma) ui2 <- bulmaPage( bulmaTabs( bulmaTab("Start", p("Nothing to see here, really")), bulmaTab("Calc", bulmaActionButton("do", "Calc"), verbatimTextOutput("out")) ) ) server2 <- function(input, output, session) { ## Need to comment out to make it run # session$onFlushed(function() { # outputOptions(output, # "out", # suspendWhenHidden = FALSE) # }) output$out <- renderPrint({ input$do }) } shinyApp(ui, server)
Standard
shiny
behaviour is not to show output elements when they are hidden. However, currently they are not shown even when changing the tab.We have to trigger a
shown
event to letshiny
know that these elements are now active.I will commit a PR with these changes. Furthermore, I propose to change
bulmaTabs
andbulmaTab
such that we avoid to hardcode thelabels
twice.