title: Issue with UI side of Shiny app with data table
body: <p>I am in the process of creating a shiny app for a process at work and am struggling to figure something out on the UI side of the app. I would like to display a data table next to a sidebar menu containing options for the app. The issue is that when I do so, the data table is pushed down below the sidebar panel instead of beside it (see the original data tab).</p>
  <p>I found a work around as seen in the suggested tab, but that comes with its own issues. I need to be able to lock the column headers while scrolling through the app and when the data table is inside the box element, I am unable to find a way to do so.</p>
  <p>Here is the code to a simplified version of the app.</p>
  <pre class="lang-r prettyprint-override"><code>library(shiny)
  library(lubridate)
  library(tidyverse)
  library(DT)
  library(shinydashboard)
  library(shinythemes)
  library(sortable)
  library(reactlog)
  
  
  ui&lt;- dashboardPage(
    #this gives you the name displayed on the tab
    dashboardHeader(title = &quot;HHS Resin Purchasing 0.99&quot;),
    #this gives you your sidebar (page) options
    dashboardSidebar(
      sidebarMenu(
        menuItem(&quot;Original Data&quot;, tabName = &quot;original&quot;),
        menuItem(&quot;Suggested&quot;, tabName = &quot;suggested&quot;)
      )
    ),
    #this is the body of the webpages
    dashboardBody(
      #this gives you the body options that are displayed on every page
      sidebarPanel(width = 2,
                   h2(&quot;Menu Options&quot;),
                   h4(strong(&quot;Upload Data:&quot;)),
                   fileInput(&quot;file&quot;, &quot;Data&quot;, buttonLabel = &quot;Upload...&quot;),
                   textInput(&quot;delim&quot;, &quot;Delimiter (leave blank to guess)&quot;, &quot;&quot;),
                   numericInput(&quot;skip&quot;, &quot;Rows to skip&quot;, 0, min = 0),
                   h4(strong(&quot;User Options:&quot;)),
                   selectInput(&quot;plant&quot;, &quot;Select a Plant&quot;, choices = 
                                 c(&quot;All&quot;)),
                   dateInput(&quot;latest_date&quot;, &quot;Select the latest W_LEAD date in the data&quot;,
                             value = Sys.Date()),
                   numericInput(&quot;avg_multiple&quot;, &quot;Multiple of Daily Useage for Cuttoff&quot;,21, min = 1, max = 50),
                   h4(strong(&quot;Download Options:&quot;)),
                   actionButton(&quot;complete_orders&quot;, &quot;Analysis for plant orders complete&quot;),
                   actionButton(&quot;complete_checks&quot;, &quot;Mid month check complete&quot;),
                   downloadButton(&quot;downloadData1&quot;, label = &quot;Download Suggested Orders...&quot;, class = &quot;btn-block&quot;),
                   downloadButton(&quot;downloadData2&quot;, label = &quot;Download Flags...&quot;, class = &quot;btn-block&quot;),
                   downloadButton(&quot;downloadData3&quot;, label = &quot;Download Full Suggested Orders Data...&quot;, class = &quot;btn-block&quot;)
                   
      ),
      #This is the actual data that fills those page options listed above
      tabItems(
        tabItem(tabName = &quot;original&quot;,
                DT::dataTableOutput(outputId = &quot;preview1&quot;)
        ),
        tabItem(tabName = &quot;suggested&quot;,
                box(title = &quot;Suggested Orders&quot;,width = 9, status = &quot;primary&quot;, height = &quot;auto&quot;,
                    solidHeader = T, dataTableOutput(&quot;preview2&quot;), style = &quot;max-height:800px; overflow-y: scroll;overflow-x: scroll;&quot;)
        )
      )
    )
  )
  
  server &lt;- function(input, output) {
    
    output$preview1 &lt;- renderDataTable({
      DT::datatable(iris, options = list(searching = T, pageLength = 20, lengthMenu = c(5,10,15, 20))
    })
    
    output$preview2 &lt;- renderDataTable({
      DT::datatable(iris, options = list(searching = T, pageLength = 20, lengthMenu = c(5,10,15, 20))
    })
  }
  
  shinyApp(ui, server)
  
  </code></pre>
  <p>Help in fixing either of the issues outlined above would be very appreciated! Thanks in advance.</p>