Shiny Dashboard - display a dedicated “loading..” page until initial loading of the data is done

前端 未结 3 1302
一整个雨季
一整个雨季 2020-12-03 11:09

I have initial loading of data from the DB in the server.R which takes a few seconds. Until this is done, the page displayed is distorted (wrong data in selecti

3条回答
  •  孤街浪徒
    2020-12-03 11:36

    The code

    hidden(
        div(
          id = "main_content",
          "Data loaded, content goes here"
        )
    

    doesn't work with tabsetPanel. But if you move the id to the div level it works beautifully. Thanks to shinyjs author Dean Attali for this tip. https://stackoverflow.com/users/4432127/keshete

      hidden(
            div(id = "mainTabsetPanel",
              tabsetPanel(
    ....
    

提交回复
热议问题