I have a shiny app with two datatables side by side. Are there any options to automatically resize the table or column when the width of the window is changed?
Ideally I'd like to see all columns (maybe reduced font size) with no X scroll bar in both tables, and the tables side by side. The code below makes the tables overlap as the window size reduces.
library(shiny)
library(DT)
shinyApp(
ui = fluidPage(
fluidRow(
column(5,
dataTableOutput('table.1')
),
column(2
),
column(5,
dataTableOutput('table.2')
)
)
),
server = function(input, output) {
output$table.1 <- renderDataTable(iris,options = list(autoWidth = TRUE))
output$table.2 <- renderDataTable(iris,options = list(autoWidth = TRUE))
}
)