I have an initial loading of data from the database into server.R , which takes a few seconds. Until this is done, the displayed page will be distorted (incorrect data in the selection field and strange arrangement of boxes, see below). 
I want to display another page (or at least different content on the first tab) until the data is fully loaded.
I was thinking of making some kind of conditionalPanel using a condition based on the selected global variable (initial_loading_done), but wherever I tried to place the conditionalPanel , this did not work.
This is the structure of my UI.R:
shinyUI( dashboardPage( dashboardHeader(title = "Title"), dashboardSidebar( sidebarMenu( menuItem("Tab1", tabName = "Tab1",icon = icon("dashboard")), menuItem("Tab2", tabName = "Tab2", icon = icon("bar-chart-o")) ) ), dashboardBody( includeCSS("custom_css.css"), tabItems( tabItem(tabName = "Tab1", fluidRow(<content>), mainPanel( fluidRow(<content>) ) ), tabItem(tabName = "Tab2", fluidRow(<content>), mainPanel( dataTableOutput('my_data_table') ) ) ) ) ) )
source share