I'm currently working on an application in Shiny (RStudio).
At the end of my application, I allow the user to download a markdown file with the most important results of the application (using downloadButton).
However, the process of this file tends to take some time, so I was wondering whether there exists some code that allows me to inform the user that the markdown file is being knitted/downloaded.
On StackOverflow, I already found (and implemented on another position in my ui-file), the following code which displays a 'Loading...' message when Shiny is running a function (with many thanks to user1603038):
conditionalPanel(condition="$('html').hasClass('shiny-busy')",
tags$div(h3("Loading..."),
tags$p("This can take a few minutes."),
id="loadmessage"))
I thought that adapting the id-name would suffice for the code to work, but it doesn't. Did I do anything wrong? Am I not allowed to use this chunk of code multiple times? I suspect that the knitting process does not concern Shiny itself. So, does there exists a similar class in html to indicate that the application is knitting a markdown file (e.g., hasClass('knitr-busy'), which unfortunately does not work)?
Alternatively, is there a way to inform the user that the downloadButton has been pressed and that RStudio is currently knitting the file (which value I -miraculously- should be able to reset after the markdown file has been generated)? I know that the actionButton in Shiny registers the amount of clicks on the button, but I'm not sure whether the downloadButton can provide a similar value...
Thanks in advance!