The datatable does not render in a Shinydashboard. It just renders a thin white strip for the box. Running only the datatable function in RStudio renders the datatable in the RStudio viewer. So what the correct way to render a DT datatable in a shiny app?
## app.R ##
library(shiny)
library(shinydashboard)
library(htmlwidgets)
library(DT)
library(xtable)
source('../ts01/db.R')
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
fluidRow(
box(tableOutput("table1"))
)
)
)
server <- function(input, output) {
output$table1 <- DT::renderDataTable({
datatable(amount_data)
})
}
shinyApp(ui, server)