So this is more of a conceptual question in response to getting a 'busy' notification working on my shiny app using the:
conditionalPanel(
condition="$('html').hasClass('shiny-busy')",
img(src="images/busy.gif"))
I've gotten a animation gif to show during an initial query to a database, but it becomes unpredictable after that. I added in a second conditionalPanel with to hide the output graph if a new database call is made:
conditionalPanel(
condition="!($('html').hasClass('shiny-busy'))",
plotOutput("Some Graph"))
The setup works through the second data pull, but if a third data base query is made, 'Some Graph' no longer hides and 'busy.gif' is no longer shown. It does flash up as a new plot is loaded.
So my overarching question is:
Is there a way to explicitly set the html class in server?
OR
How/when does Shiny set the class value?