I use Shiny GUI R package. I'm looking for a way to display a message like "loading..." after the actionButton was pressed. The function takes several minutes to execute, so I need to inform the user somehow that the button actually triggered some event. Now the server.R code looks like this:
DATA <- reactive({
if(input$DownloadButton>0) {
RunDownload()
} else {
NULL
}
})
output$Download <- renderText({
if(NROW(DATA())>0) {
paste0(Sys.time(),": ",NROW(DATA()), " items downloaded")
} else {
''
}
})
actionButton()
is a function that downloads data from internet. input$DownloadButton
is actionButton. So after the button was pressed the user waits for several minutes and only then sees a message saying that download was successful. I would like to show a message "Loading..." just after the actionButton was pressed and then another message like paste0(Sys.time(),": ",NROW(DATA()), " items downloaded")
when execution ends.
RunDownload
to see how to add progress bar ? – dickoa