I'm looping while creating a Shiny Dashboard in R (using the package shinydashboard
). I want to lock the sidebar so that it doesn't scroll when I view the contents of my tabs, but I'm not sure how to do this.
As an example, the following code block will create a long scroll. It would be nice to lock the sidebar so that you can still see the menu tabs while scrolling through the obscene data table.
library(ggplot2)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title="MPG Data"),
dashboardSidebar(sidebarMenu(menuItem("MPG", tabName="mpg"))),
dashboardBody(tabItems(tabItem(tabName="mpg", fluidRow(tableOutput("mpgTable"))))))
server <- function(input, output) {
output$mpgTable <- renderTable({mpg})
}
shinyApp(ui, server)
source
share