I am unable to control the width of a datatable I have added to a shiny app using the function dataTableOutput()
. I've tried to use the width
parameter within the function but it changes nothing in the output and there is no error ~ it's not telling me that it's ignoring the width
parameter.
library(shiny)
library(shinythemes)
ui <- fluidPage(theme = shinytheme("Spacelab"),
fluidRow(
column(6,dataTableOutput(outputId = "table")),
column(6,p(textOutput("para")))
)
)
server <- function(input, output){
df <- as.data.frame(matrix(0, ncol = 15, nrow = 20))
output$table <- renderDataTable({df})
output$para <- renderText({
text <- rep(x = "Hello World",1000)
})
}
shinyApp(ui = ui,server = server)