For the example below, I would like to see the loading message only once when the app is loaded. However, it re-appears when the number of obs is changed. How can I avoid this? Best, Nader
library(shiny) runApp(list( ui = pageWithSidebar( headerPanel("Test"), sidebarPanel( tags$head(tags$style(type="text/css", " #loadmessage { position: fixed; top: 0px; left: 0px; width: 100%; padding: 5px 0px 5px 0px; text-align: center; font-weight: bold; font-size: 100%; color: #000000; background-color: #CCFF66; z-index: 105; } ")), numericInput('n', 'Number of obs', 100), conditionalPanel(condition="$('html').hasClass('shiny-busy')", tags$div("Loading...",id="loadmessage")) ), mainPanel(plotOutput('plot')) ), server = function(input, output) { output$plot <- renderPlot({ Sys.sleep(2); hist(runif(input$n)) }) } ))
https://stackoverflow.com/questions/66825095/how-to-disconnect-the-loading-massage-to-the-content-when-the-app-is-fully-loade March 27, 2021 at 06:34AM
没有评论:
发表评论