Reputation: 129
I have two boxes in the first are two inputs and second box contains table. I use package DT for table. This setting is ok for resolution 1920x1080 but problem is in smaller resolution for example 1024x768
tabItem(tabName="Table",titlePanel("My Data"),
box(width=2,uiOutput("first_input"),textInput("numbers_input",label="choose your option",width ="200px")),
box(width=9,dataTableOutput("tabData"))
),
Upvotes: 0
Views: 285
Reputation: 29417
Try adding scrollX = T
library(shiny)
library(shinydashboard)
library(DT)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
tabItem(tabName="Table",titlePanel("My Data"),
box(width=2,uiOutput("first_input"),textInput("numbers_input",label="choose your option",width ="200px")),
box(width=9,dataTableOutput("tabData"))
)
)
)
server <- function(input, output, session) {
output$tabData <- renderDataTable({cbind(mtcars,mtcars)},options = list(scrollX = T))
}
shinyApp(ui, server)
Upvotes: 1